LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: TZipThreadWorks::run(int, void*)
static void run(int threadIndex,void* workData){
        TZipThreadWorks* self=(TZipThreadWorks*)workData;
        _auto_thread_end_t _thread_end(*self);
        while (TZipThreadWork* work=self->getWork()){
            self->doWork(work);
            self->endWork(work);
        }
    }

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

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

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

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

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

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

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r8
movq %rdi, %rbx
movq %rsp, %rdx
movq %rsi, (%rdx)
subq %rsi, %r8
movq %r8, 0x8(%rdx)
leaq -0xbe(%rip), %rax       # 0x43946
movq %rax, 0x10(%rdx)
movq %r14, %rsi
subq %rcx, %rsi
xorl %r12d, %r12d
xorl %ecx, %ecx
callq *0x8(%rdi)
testq %rax, %rax
je 0x43a3a
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *0x18(%rbx)
movl %eax, %r12d
movq %rbx, %rdi
movq %r13, %rsi
callq *0x10(%rbx)
testl %eax, %eax
je 0x43a4b
movl %r12d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1d8b2(%rip), %rdi     # 0x61304
leaq 0x1d8b5(%rip), %rsi     # 0x6130e
leaq 0x1d8d6(%rip), %rcx     # 0x61336
movl $0xbd, %edx
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/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 %rax
testq %rdi, %rdi
je 0x44382
testq %rsi, %rsi
je 0x443a1
movq %rcx, %rax
subq %rdx, %rax
jb 0x443c0
cmpq %rcx, 0x8(%rsi)
jb 0x443df
movq %rsi, 0x20(%rdi)
movq %rdx, 0x28(%rdi)
movq %rdi, (%rdi)
movq %rax, 0x8(%rdi)
leaq 0x82(%rip), %rax        # 0x443fe
movq %rax, 0x10(%rdi)
popq %rax
retq
leaq 0x1d0d6(%rip), %rdi     # 0x6145f
leaq 0x1cf7e(%rip), %rsi     # 0x6130e
leaq 0x1d0d0(%rip), %rcx     # 0x61467
movl $0x18f, %edx            # imm = 0x18F
callq 0x4200
leaq 0x1d133(%rip), %rdi     # 0x614db
leaq 0x1cf5f(%rip), %rsi     # 0x6130e
leaq 0x1d0b1(%rip), %rcx     # 0x61467
movl $0x190, %edx            # imm = 0x190
callq 0x4200
leaq 0x19938(%rip), %rdi     # 0x5dcff
leaq 0x1cf40(%rip), %rsi     # 0x6130e
leaq 0x1d092(%rip), %rcx     # 0x61467
movl $0x191, %edx            # imm = 0x191
callq 0x4200
leaq 0x1d102(%rip), %rdi     # 0x614e8
leaq 0x1cf21(%rip), %rsi     # 0x6130e
leaq 0x1d073(%rip), %rcx     # 0x61467
movl $0x192, %edx            # imm = 0x192
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/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 %rax
testq %rdi, %rdi
je 0x44466
testq %rsi, %rsi
je 0x44485
movq %rcx, %rax
subq %rdx, %rax
jb 0x444a4
cmpq %rcx, 0x8(%rsi)
jb 0x444c3
movq %rsi, 0x20(%rdi)
movq %rdx, 0x28(%rdi)
movq %rdi, (%rdi)
movq %rax, 0x8(%rdi)
leaq -0x57(%rip), %rax       # 0x443fe
movq %rax, 0x10(%rdi)
leaq 0x82(%rip), %rax        # 0x444e2
movq %rax, 0x18(%rdi)
popq %rax
retq
leaq 0x1cff2(%rip), %rdi     # 0x6145f
leaq 0x1ce9a(%rip), %rsi     # 0x6130e
leaq 0x1d08f(%rip), %rcx     # 0x6150a
movl $0x1a6, %edx            # imm = 0x1A6
callq 0x4200
leaq 0x1d04f(%rip), %rdi     # 0x614db
leaq 0x1ce7b(%rip), %rsi     # 0x6130e
leaq 0x1d070(%rip), %rcx     # 0x6150a
movl $0x1a7, %edx            # imm = 0x1A7
callq 0x4200
leaq 0x19854(%rip), %rdi     # 0x5dcff
leaq 0x1ce5c(%rip), %rsi     # 0x6130e
leaq 0x1d051(%rip), %rcx     # 0x6150a
movl $0x1a8, %edx            # imm = 0x1A8
callq 0x4200
leaq 0x1d01e(%rip), %rdi     # 0x614e8
leaq 0x1ce3d(%rip), %rsi     # 0x6130e
leaq 0x1d032(%rip), %rcx     # 0x6150a
movl $0x1a9, %edx            # imm = 0x1A9
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq 0x8(%rdi), %r15
movq 0x28(%rdi), %rax
subq (%rdi), %r15
subq 0x20(%rdi), %rax
addq %rax, %r15
movl $0x104, %r12d           # imm = 0x104
cmpq %r12, %r15
cmovbq %r15, %r12
cmpq %r12, %rax
jae 0x44557
movq %rbx, %rdi
callq 0x445b4
testl %eax, %eax
je 0x44553
movq 0x28(%rbx), %rax
subq 0x20(%rbx), %rax
cmpq %r12, %rax
jae 0x44557
xorl %esi, %esi
jmp 0x4455f
movq 0x18(%rbx), %rsi
addq 0x20(%rbx), %rsi
xorl %eax, %eax
testq %rsi, %rsi
je 0x445ab
testq %r15, %r15
je 0x445ab
cmpq $0x1, %r12
adcq $0x0, %r12
xorl %r15d, %r15d
cmpb %bpl, (%rsi,%r15)
je 0x44588
incq %r15
cmpq %r15, %r12
jne 0x44576
xorl %eax, %eax
jmp 0x445ab
movq %r14, %rdi
movq %r15, %rdx
callq 0x4290
movb $0x0, (%r14,%r15)
movq 0x20(%rbx), %rax
addq %r15, %rax
incq %rax
movq %rax, 0x20(%rbx)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %r12
subq (%rdi), %r12
movq 0x20(%rdi), %rdi
cmpq %r12, %rdi
cmovbq %rdi, %r12
movl $0x1, %ebx
testq %r12, %r12
je 0x44623
movq 0x18(%r14), %r15
movq 0x28(%r14), %rdx
subq %rdi, %rdx
je 0x445f7
leaq (%r15,%rdi), %rsi
subq %r12, %rdi
addq %r15, %rdi
callq 0x4510
movq (%r14), %rsi
movq 0x10(%r14), %rdi
movq 0x28(%r14), %rax
movq %rax, %rdx
subq %r12, %rdx
addq %r15, %rdx
addq %rax, %r15
movq %r15, %rcx
callq *0x10(%rdi)
testl %eax, %eax
je 0x44621
subq %r12, 0x20(%r14)
addq %r12, (%r14)
jmp 0x44623
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rbx, %rbx
je 0x4468e
movq 0x28(%r14), %rax
cmpq %rbx, %rax
movq %rbx, %r15
cmovbq %rax, %r15
subq 0x20(%r14), %rax
cmpq %r15, %rax
jae 0x44673
movq %r14, %rdi
callq 0x445b4
movb $0x1, %cl
testl %eax, %eax
je 0x4467b
movq 0x28(%r14), %rax
subq 0x20(%r14), %rax
cmpq %r15, %rax
jb 0x4467b
cmpq $0x0, 0x18(%r14)
sete %cl
testb %cl, %cl
jne 0x44686
addq %r15, 0x20(%r14)
subq %r15, %rbx
testb %cl, %cl
je 0x4463c
xorl %eax, %eax
jmp 0x44693
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x28(%rdi), %rcx
subq (%rdi), %rax
subq 0x20(%rdi), %rcx
addq %rcx, %rax
cmpq $0xb, %rax
movl $0xb, %r15d
cmovbq %rax, %r15
cmpq %r15, %rcx
jae 0x446ef
movq %rbx, %rdi
callq 0x445b4
testl %eax, %eax
je 0x446ea
movq 0x28(%rbx), %rax
subq 0x20(%rbx), %rax
cmpq %r15, %rax
jae 0x446ef
xorl %r13d, %r13d
jmp 0x446f7
movq 0x18(%rbx), %r13
addq 0x20(%rbx), %r13
xorl %r12d, %r12d
testq %r13, %r13
je 0x4472a
movq %rsp, %rdi
movq %r13, (%rdi)
addq %r13, %r15
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x438c6
testl %eax, %eax
je 0x4472a
movq (%rsp), %rax
subq %r13, %rax
addq %rax, 0x20(%rbx)
movl $0x1, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, (%rsp)
movq %rsi, %r15
movq %rdi, %rbx
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %r14
subq %rsi, %r14
movq (%rsp), %r13
subq %r15, %r13
cmpq %r13, %r14
movq %r13, %r12
cmovbq %r14, %r12
addq 0x18(%rbx), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x4290
addq %r12, 0x20(%rbx)
movl $0x1, %ebp
cmpq %r14, %r13
jbe 0x447d5
subq %r12, %r13
addq %r12, %r15
movq 0x28(%rbx), %rax
shrq %rax
cmpq %rax, %r13
jae 0x447b9
movq %rbx, %rdi
callq 0x445b4
xorl %ebp, %ebp
testl %eax, %eax
je 0x447d5
movq 0x28(%rbx), %rax
subq 0x20(%rbx), %rax
cmpq %rax, %r13
jbe 0x44751
jmp 0x447d5
movq (%rbx), %rsi
movq 0x10(%rbx), %rdi
movq %r15, %rdx
movq (%rsp), %rcx
callq *0x10(%rdi)
testl %eax, %eax
je 0x447d3
addq %r13, (%rbx)
jmp 0x447d5
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/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 %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x28(%rdi), %rax
subq 0x20(%rdi), %rax
cmpq %rdx, %rax
jae 0x4481e
movq %r15, %rdi
callq 0x445b4
testl %eax, %eax
je 0x4481a
movq 0x28(%r15), %rax
subq 0x20(%r15), %rax
cmpq %rbx, %rax
jae 0x4481e
xorl %ecx, %ecx
jmp 0x44826
movq 0x18(%r15), %rcx
addq 0x20(%r15), %rcx
addq %rbx, 0x20(%r15)
testq %rcx, %rcx
je 0x4484d
movl $0x1, %eax
testq %rbx, %rbx
je 0x4484f
xorl %edx, %edx
movb (%rcx,%rdx), %sil
addb %sil, (%r14,%rdx)
incq %rdx
cmpq %rdx, %rbx
jne 0x4483b
jmp 0x4484f
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq 0x18(%rdi), %r15
movl $0x1, %ebx
testq %r15, %r15
je 0x449cc
movq %rdi, %r14
movq 0x10(%rdi), %rdx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
leaq (%rdx,%r15), %rcx
callq *0x18(%rdi)
testl %eax, %eax
je 0x449ca
addq %r15, (%r14)
movq $0x0, 0x18(%r14)
jmp 0x449cc
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
testq %rbx, %rbx
je 0x44a78
movq 0x18(%r15), %r13
movq 0x20(%r15), %r12
cmpq %r12, %rbx
setae %al
testq %r13, %r13
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x44a2b
movq (%r15), %rsi
movq 0x8(%r15), %rdi
leaq (%r14,%rbx), %rcx
movq %r14, %rdx
callq *0x18(%rdi)
testl %eax, %eax
je 0x44a6a
addq %rbx, (%r15)
movl $0x1, %ebp
jmp 0x44a6c
subq %r13, %r12
cmpq %rbx, %r12
cmovaeq %rbx, %r12
movq 0x10(%r15), %rdi
addq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x4290
addq %r12, %r13
movq %r13, 0x18(%r15)
addq %r12, %r14
subq %r12, %rbx
cmpq 0x20(%r15), %r13
jne 0x44a66
movq %r15, %rdi
callq 0x44991
testl %eax, %eax
je 0x44a6a
movb $0x1, %al
jmp 0x44a6e
xorl %ebp, %ebp
xorl %eax, %eax
testb %al, %al
jne 0x449e8
jmp 0x44a7d
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, %ebx
testq %rdx, %rdx
je 0x44af2
movq %rdx, %r14
movq %rdi, %r15
movzbl %sil, %ebp
movq 0x18(%r15), %r13
movq 0x20(%r15), %r12
subq %r13, %r12
cmpq %r14, %r12
cmovaeq %r14, %r12
movq 0x10(%r15), %rdi
addq %r13, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x41c0
addq %r12, %r13
movq %r13, 0x18(%r15)
cmpq 0x20(%r15), %r13
jne 0x44ae9
movq %r15, %rdi
callq 0x44991
testl %eax, %eax
je 0x44af0
subq %r12, %r14
jne 0x44aad
jmp 0x44af2
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
testq %rbx, %rbx
je 0x44b7e
movq 0x18(%r12), %r13
movq 0x20(%r12), %rbp
subq %r13, %rbp
movq 0x10(%r12), %rdx
addq %r13, %rdx
cmpq %rbx, %rbp
cmovaeq %rbx, %rbp
leaq (%rdx,%rbp), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq *0x10(%r15)
xorl %ecx, %ecx
testl %eax, %eax
je 0x44b76
addq %rbp, %r14
addq %rbp, %r13
movq %r13, 0x18(%r12)
subq %rbp, %rbx
cmpq 0x20(%r12), %r13
jne 0x44b72
movq %r12, %rdi
callq 0x44991
xorl %ecx, %ecx
testl %eax, %eax
je 0x44b76
movb $0x1, %al
jmp 0x44b78
xorl %eax, %eax
testb %al, %al
jne 0x44b1a
jmp 0x44b83
movl $0x1, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x44c14
movq 0x28(%r14), %rax
movq %rax, %r12
cmpq %rbx, %rax
jb 0x44bbb
movq %rbx, %r12
subq 0x20(%r14), %rax
cmpq %r12, %rax
jae 0x44be1
movq %r14, %rdi
callq 0x445b4
testl %eax, %eax
je 0x44bdd
movq 0x28(%r14), %rax
subq 0x20(%r14), %rax
cmpq %r12, %rax
jae 0x44be1
xorl %esi, %esi
jmp 0x44be9
movq 0x18(%r14), %rsi
addq 0x20(%r14), %rsi
addq %r12, 0x20(%r14)
testq %rsi, %rsi
je 0x44c0c
movq %r15, %rdi
movq %r12, %rdx
callq 0x449d4
testl %eax, %eax
setne %al
jne 0x44c07
xorl %r12d, %r12d
subq %r12, %rbx
jmp 0x44c0e
xorl %eax, %eax
testb %al, %al
jne 0x44ba7
jmp 0x44c19
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
subq $0x68, %rsp
testq %rdi, %rdi
je 0x4505a
movq %rsi, %rdx
testq %rsi, %rsi
je 0x45079
cmpq $0x0, 0x10(%rdx)
je 0x45098
movq %rsp, %rsi
callq 0x44e00
addq $0x68, %rsp
retq
leaq 0x1c594(%rip), %rdi     # 0x615f5
leaq 0x1c2a6(%rip), %rsi     # 0x6130e
leaq 0x1c596(%rip), %rcx     # 0x61605
movl $0x4d2, %edx            # imm = 0x4D2
callq 0x4200
leaq 0x1c5e1(%rip), %rdi     # 0x61661
leaq 0x1c287(%rip), %rsi     # 0x6130e
leaq 0x1c577(%rip), %rcx     # 0x61605
movl $0x4d3, %edx            # imm = 0x4D3
callq 0x4200
leaq 0x1c5d4(%rip), %rdi     # 0x61673
leaq 0x1c268(%rip), %rsi     # 0x6130e
leaq 0x1c558(%rip), %rcx     # 0x61605
movl $0x4d4, %edx            # imm = 0x4D4
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: patch_stream_with_cache
hpatch_BOOL patch_stream_with_cache(const struct hpatch_TStreamOutput* out_newData,
                                    const struct hpatch_TStreamInput*  oldData,
                                    const struct hpatch_TStreamInput*  serializedDiff,
                                    TByte*   temp_cache,TByte* temp_cache_end){
    hpatch_BOOL     result;
    hpatch_TCovers* covers=0;//not need close before return
    hpatch_BOOL    isReadError=hpatch_FALSE;
    _patch_cache(&covers,&oldData,out_newData->streamSize,serializedDiff,hpatch_FALSE,0,
                _kCachePatCount,&temp_cache,&temp_cache_end,&isReadError);
    if (isReadError) return _hpatch_FALSE;
    result=_patch_stream_with_cache(out_newData,oldData,serializedDiff,covers,
                                    temp_cache,temp_cache_end);
    //if ((covers!=0)&&(!covers->close(covers))) result=_hpatch_FALSE;
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %rax
movq %rsi, (%rax)
leaq 0x18(%rsp), %r10
movq %rcx, (%r10)
leaq 0x10(%rsp), %r11
movq %r8, (%r11)
leaq 0x8(%rsp), %rdi
movq $0x0, (%rdi)
leaq 0x2c(%rsp), %r15
movl $0x0, (%r15)
movq 0x8(%r14), %rdx
movq %rax, %rsi
movq %rbx, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r15
pushq %r11
pushq %r10
pushq $0x8
callq 0x45151
addq $0x20, %rsp
cmpl $0x0, (%r15)
je 0x45129
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq 0x20(%rsp), %rsi
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %r8
movq 0x10(%rsp), %r9
movq %r14, %rdi
movq %rbx, %rdx
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x45c94
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: patch_decompress_with_cache
hpatch_BOOL patch_decompress_with_cache(const hpatch_TStreamOutput* out_newData,
                                        const hpatch_TStreamInput*  oldData,
                                        const hpatch_TStreamInput*  compressedDiff,
                                        hpatch_TDecompress* decompressPlugin,
                                        TByte* temp_cache,TByte* temp_cache_end){
    hpatch_BOOL     result;
    hpatch_TCovers* covers=0; //need close before return
    hpatch_BOOL    isReadError=hpatch_FALSE;
    _patch_cache(&covers,&oldData,out_newData->streamSize,compressedDiff,hpatch_TRUE,
                 decompressPlugin,_kCacheDecCount,&temp_cache,&temp_cache_end,&isReadError);
    if (isReadError) return _hpatch_FALSE;
    result=_patch_decompress_cache(out_newData,0,oldData,compressedDiff,decompressPlugin,
                                   covers,temp_cache,temp_cache_end);
    if ((covers!=0)&&(!covers->close(covers))) result=_hpatch_FALSE;
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
leaq 0x20(%rsp), %rax
movq %rsi, (%rax)
leaq 0x18(%rsp), %r10
movq %r8, (%r10)
leaq 0x10(%rsp), %r11
movq %r9, (%r11)
leaq 0x8(%rsp), %rdi
movq $0x0, (%rdi)
leaq 0x2c(%rsp), %r12
movl $0x0, (%r12)
movq 0x8(%r15), %rdx
movq %rax, %rsi
movq %r14, %rcx
movl $0x1, %r8d
movq %rbx, %r9
pushq %r12
pushq %r11
pushq %r10
pushq $0x6
callq 0x45151
addq $0x20, %rsp
xorl %ebp, %ebp
cmpl $0x0, (%r12)
jne 0x4611f
movq 0x20(%rsp), %rsi
movq 0x8(%rsp), %r12
movq 0x18(%rsp), %r9
subq $0x8, %rsp
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
movq %r12, %r8
pushq 0x18(%rsp)
callq 0x4612e
addq $0x10, %rsp
movl %eax, %ebp
testq %r12, %r12
je 0x4611f
movq %r12, %rdi
callq *0x18(%r12)
testl %eax, %eax
cmovel %eax, %ebp
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: hpatch_coverList_open_serializedDiff
hpatch_BOOL hpatch_coverList_open_serializedDiff(hpatch_TCoverList* out_coverList,
                                                 const hpatch_TStreamInput*  serializedDiff){
    TByte* temp_cache;
    TByte* temp_cache_end;
    _TPackedCovers* packedCovers=0;
    _THDiffHead     diffHead;
    assert((out_coverList!=0)&&(out_coverList->ICovers==0));
    temp_cache=out_coverList->_buf;
    temp_cache_end=temp_cache+sizeof(out_coverList->_buf);
    if (!_packedCovers_open(&packedCovers,&diffHead,serializedDiff,
                            temp_cache,temp_cache_end))
        return _hpatch_FALSE;
    out_coverList->ICovers=&packedCovers->base.ICovers;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq $0x0, (%rsp)
testq %rdi, %rdi
je 0x4664b
movq %rdi, %rbx
cmpq $0x0, (%rdi)
jne 0x4664b
movq %rsi, %rdx
leaq 0x8(%rbx), %rcx
leaq 0x4008(%rbx), %r8
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x4666a
testl %eax, %eax
je 0x46643
movq (%rsp), %rax
movq %rax, (%rbx)
movl $0x1, %eax
jmp 0x46645
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
retq
leaq 0x1b039(%rip), %rdi     # 0x6168b
leaq 0x1acb5(%rip), %rsi     # 0x6130e
leaq 0x1b05b(%rip), %rcx     # 0x616bb
movl $0x7ae, %edx            # imm = 0x7AE
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: hpatch_coverList_open_compressedDiff
hpatch_BOOL hpatch_coverList_open_compressedDiff(hpatch_TCoverList* out_coverList,
                                                 const hpatch_TStreamInput*  compressedDiff,
                                                 hpatch_TDecompress*         decompressPlugin){
    TByte* temp_cache;
    TByte* temp_cache_end;
    _TCompressedCovers* compressedCovers=0;
    hpatch_compressedDiffInfo diffInfo;
    assert((out_coverList!=0)&&(out_coverList->ICovers==0));
    temp_cache=out_coverList->_buf;
    temp_cache_end=temp_cache+sizeof(out_coverList->_buf);
    if (!_compressedCovers_open(&compressedCovers,&diffInfo,compressedDiff,decompressPlugin,
                                temp_cache,temp_cache_end))
        return _hpatch_FALSE;
    out_coverList->ICovers=&compressedCovers->base.ICovers;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq $0x0, (%rsp)
testq %rdi, %rdi
je 0x468ab
movq %rdi, %rbx
cmpq $0x0, (%rdi)
jne 0x468ab
movq %rdx, %rcx
movq %rsi, %rdx
leaq 0x8(%rbx), %r8
leaq 0x4008(%rbx), %r9
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x468ca
testl %eax, %eax
je 0x468a0
movq (%rsp), %rax
movq %rax, (%rbx)
movl $0x1, %eax
jmp 0x468a2
xorl %eax, %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbx
retq
leaq 0x1add9(%rip), %rdi     # 0x6168b
leaq 0x1aa55(%rip), %rsi     # 0x6130e
leaq 0x1ae5e(%rip), %rcx     # 0x6171e
movl $0x7bf, %edx            # imm = 0x7BF
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: compressedCovers_open
static hpatch_BOOL _compressedCovers_open(_TCompressedCovers** out_self,
                                          hpatch_compressedDiffInfo* out_diffInfo,
                                          const hpatch_TStreamInput* compressedDiff,
                                          hpatch_TDecompress* decompressPlugin,
                                          TByte* temp_cache,TByte* temp_cache_end){
    _THDiffzHead    head;
    hpatch_StreamPos_t  diffPos0=0;
    _TCompressedCovers* self=0;
    _cache_alloc(self,_TCompressedCovers,sizeof(_TCompressedCovers),temp_cache,temp_cache_end);
    if (!read_diffz_head(out_diffInfo,&head,compressedDiff)) return _hpatch_FALSE;
    diffPos0=head.headEndPos;
    if (head.compress_cover_buf_size>0){
        if (decompressPlugin==0) return _hpatch_FALSE;
        if (!decompressPlugin->is_can_open(out_diffInfo->compressType)) return _hpatch_FALSE;
    }
    
    _covers_init(&self->base,head.coverCount,&self->coverClip,
                 &self->coverClip,&self->coverClip,hpatch_TRUE);
    self->base.ICovers.close=_compressedCovers_close;
    memset(&self->decompresser,0, sizeof(self->decompresser));
    if (!getStreamClip(&self->coverClip,&self->decompresser,
                       head.cover_buf_size,head.compress_cover_buf_size,
                       compressedDiff,&diffPos0,decompressPlugin,
                       temp_cache,temp_cache_end-temp_cache)) {
        return _hpatch_FALSE;
    };
    *out_self=self;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq $0x0, (%rsp)
movq %r9, %rax
subq %r8, %rax
xorl %ebx, %ebx
cmpq $0xc0, %rax
jb 0x46a07
movq %r9, %r13
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, 0x8(%rsp)
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x44e00
testl %eax, %eax
je 0x46a07
movq 0x20(%rsp), %rcx
movq 0x68(%rsp), %rax
movq %rax, (%rsp)
testq %rcx, %rcx
je 0x46952
testq %r12, %r12
je 0x46a07
addq $0x14, %r15
movq %r15, %rdi
movq %rcx, %r15
callq *(%r12)
movq %r15, %rcx
testl %eax, %eax
je 0x46a07
addq $0x7, %r14
andq $-0x8, %r14
leaq 0xb8(%r14), %rax
movq 0x10(%rsp), %rsi
leaq 0x58(%r14), %rdi
leaq 0x17da(%rip), %rdx      # 0x4814b
movq %rdx, (%r14)
leaq 0x17d5(%rip), %rdx      # 0x48150
movq %rdx, 0x8(%r14)
leaq 0x18fb(%rip), %rdx      # 0x48281
movq %rdx, 0x10(%r14)
movq %rsi, 0x20(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movq %rdi, 0x38(%r14)
movq %rdi, 0x40(%r14)
movq %rdi, 0x48(%r14)
movl $0x1, 0x50(%r14)
leaq 0x191e(%rip), %rdx      # 0x482cf
movq %rdx, 0x18(%r14)
leaq 0x88(%r14), %rsi
movups %xmm0, 0x88(%r14)
movups %xmm0, 0x98(%r14)
movups %xmm0, 0xa8(%r14)
movq 0x18(%rsp), %rdx
subq %rax, %r13
subq $0x8, %rsp
leaq 0x8(%rsp), %r9
movq %rbp, %r8
pushq %r13
pushq %rax
pushq %r12
callq 0x44855
addq $0x20, %rsp
testl %eax, %eax
je 0x46a07
movq 0x8(%rsp), %rax
movq %r14, (%rax)
movl $0x1, %ebx
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: compressed_stream_as_uncompressed
hpatch_BOOL compressed_stream_as_uncompressed(hpatch_TUncompresser_t* uncompressedStream,hpatch_StreamPos_t uncompressedSize,
                                              hpatch_TDecompress* decompressPlugin,const hpatch_TStreamInput* compressedStream,
                                              hpatch_StreamPos_t compressed_pos,hpatch_StreamPos_t compressed_end){
    hpatch_TUncompresser_t* self=uncompressedStream;
    assert(decompressPlugin!=0);
    assert(self->_decompressHandle==0);
    self->_decompressHandle=decompressPlugin->open(decompressPlugin,uncompressedSize,compressedStream,
                                                   compressed_pos,compressed_end);
    if (self->_decompressHandle==0) return _hpatch_FALSE;
    self->_decompressPlugin=decompressPlugin;
    
    self->base.streamImport=self;
    self->base.streamSize=uncompressedSize;
    self->base.read=_TUncompresser_read;
    return hpatch_TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdx, %rdx
je 0x46b91
movq %rdi, %rbx
cmpq $0x0, 0x28(%rdi)
jne 0x46bb0
movq %rdx, %r15
movq %rsi, %r14
movq %rdx, %rdi
movq %rcx, %rdx
movq %r8, %rcx
movq %r9, %r8
callq *0x8(%r15)
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x46b89
movq %r15, 0x20(%rbx)
movq %rbx, (%rbx)
movq %r14, 0x8(%rbx)
leaq 0x8b7(%rip), %rax       # 0x47435
movq %rax, 0x10(%rbx)
movl $0x1, %eax
jmp 0x46b8b
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x172ae(%rip), %rdi     # 0x5de46
leaq 0x1a76f(%rip), %rsi     # 0x6130e
leaq 0x1abf1(%rip), %rcx     # 0x61797
movl $0x81d, %edx            # imm = 0x81D
callq 0x4200
leaq 0x1ac97(%rip), %rdi     # 0x6184e
leaq 0x1a750(%rip), %rsi     # 0x6130e
leaq 0x1abd2(%rip), %rcx     # 0x61797
movl $0x81e, %edx            # imm = 0x81E
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: close_compressed_stream_as_uncompressed
void close_compressed_stream_as_uncompressed(hpatch_TUncompresser_t* uncompressedStream){
    hpatch_TUncompresser_t* self=uncompressedStream;
    if (self==0) return;
    if (self->_decompressHandle==0) return;
    self->_decompressPlugin->close(self->_decompressPlugin,self->_decompressHandle);
    self->_decompressHandle=0;
}

// Assembly:
testq %rdi, %rdi
je 0x472a0
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rsi
testq %rsi, %rsi
je 0x4729f
movq 0x20(%rbx), %rdi
callq *0x10(%rdi)
movq $0x0, 0x28(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: sspatch_covers_nextCover
hpatch_BOOL sspatch_covers_nextCover(sspatch_covers_t* self){
    hpatch_BOOL inc_oldPos_sign=(*(self->covers_cache))>>(8-1);
    self->lastOldEnd=self->cover.oldPos+self->cover.length;
    self->lastNewEnd=self->cover.newPos+self->cover.length;
    if (!hpatch_unpackUIntWithTag(&self->covers_cache,self->covers_cacheEnd,&self->cover.oldPos,1)) return _hpatch_FALSE;
    if (inc_oldPos_sign==0)
        self->cover.oldPos+=self->lastOldEnd;
    else
        self->cover.oldPos=self->lastOldEnd-self->cover.oldPos;
    if (!hpatch_unpackUInt(&self->covers_cache,self->covers_cacheEnd,&self->cover.newPos)) return _hpatch_FALSE;
    self->cover.newPos+=self->lastNewEnd;
    if (!hpatch_unpackUInt(&self->covers_cache,self->covers_cacheEnd,&self->cover.length)) return _hpatch_FALSE;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
movb (%rax), %bpl
leaq 0x20(%rdi), %rdx
movq 0x30(%rdi), %rax
movq 0x20(%rdi), %rcx
addq %rax, %rcx
movq %rcx, 0x10(%rdi)
addq 0x28(%rdi), %rax
movq %rax, 0x18(%rdi)
movl $0x1, %ecx
callq 0x438c6
testl %eax, %eax
je 0x474d4
leaq 0x28(%rbx), %rdx
movq 0x20(%rbx), %rax
movq %rax, %rcx
negq %rcx
testb %bpl, %bpl
cmovnsq %rax, %rcx
movq 0x8(%rbx), %rsi
addq 0x10(%rbx), %rcx
movq %rcx, 0x20(%rbx)
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x438c6
testl %eax, %eax
je 0x474d4
leaq 0x30(%rbx), %rdx
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rax
addq %rax, 0x28(%rbx)
movq %rbx, %rdi
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x438c6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: TDiffToSingleStream_init
void TDiffToSingleStream_init(TDiffToSingleStream* self,const hpatch_TStreamInput* diffStream){
    self->base.streamImport=self;
    self->base.streamSize=diffStream->streamSize;
    self->base.read=_TDiffToSingleStream_read;
    self->base._private_reserved=0;
    self->diffStream=diffStream;
    self->readedSize=0;
    self->cachedBufBegin=_TDiffToSingleStream_kBufSize;
    self->isInSingleStream=hpatch_FALSE;
}

// Assembly:
movq %rdi, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
leaq 0x22(%rip), %rax        # 0x47511
movq %rax, 0x10(%rdi)
xorl %eax, %eax
movq %rax, 0x18(%rdi)
movq %rsi, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movq $0x1000, 0x30(%rdi)     # imm = 0x1000
movl $0x0, 0x38(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: arrayCovers_read_cover
static hpatch_BOOL _arrayCovers_read_cover(struct hpatch_TCovers* covers,hpatch_TCover* out_cover){
    _TArrayCovers* self=(_TArrayCovers*)covers;
    hpatch_size_t i=self->cur_index;
    if (i<self->coverCount){
        if (self->is32){
            const hpatch_TCCover32* pCover=((const hpatch_TCCover32*)self->pCCovers)+i;
            out_cover->oldPos=pCover->oldPos;
            out_cover->newPos=pCover->newPos;
            out_cover->length=pCover->length;
        }else{
            const hpatch_TCCover64* pCover=((const hpatch_TCCover64*)self->pCCovers)+i;
            out_cover->oldPos=pCover->oldPos;
            out_cover->newPos=pCover->newPos;
            out_cover->length=pCover->length;
        }
        self->cur_index=i+1;
        return hpatch_TRUE;
    }else{
        return _hpatch_FALSE;
    }
}

// Assembly:
movq 0x30(%rdi), %rcx
xorl %eax, %eax
cmpq 0x28(%rdi), %rcx
jae 0x478e9
cmpl $0x0, 0x38(%rdi)
movq 0x20(%rdi), %rax
movq %rcx, %rdx
je 0x478c0
shlq $0x4, %rdx
movl (%rax,%rdx), %r8d
movq %r8, (%rsi)
movl 0x4(%rax,%rdx), %r8d
movq %r8, 0x8(%rsi)
movl 0x8(%rax,%rdx), %eax
jmp 0x478d9
shlq $0x5, %rdx
movq (%rax,%rdx), %r8
movq %r8, (%rsi)
movq 0x8(%rax,%rdx), %r8
movq %r8, 0x8(%rsi)
movq 0x10(%rax,%rdx), %rax
movq %rax, 0x10(%rsi)
incq %rcx
movq %rcx, 0x30(%rdi)
movl $0x1, %eax
retq