LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TNewDataSubDiffStream::TNewDataSubDiffStream(hpatch_TStreamInput const*, hpatch_TStreamInput const*, hdiff_private::TCovers const&, bool, bool)
TNewDataSubDiffStream::TNewDataSubDiffStream(const hdiff_TStreamInput* _newData,const hdiff_TStreamInput* _oldData,
                                             const TCovers& _covers,bool _isOnlySubCover,bool _isZeroSubDiff)
:newData(_newData),oldData(_oldData),covers(_covers),
  isOnlySubCover(_isOnlySubCover),isZeroSubDiff(_isZeroSubDiff),_cache(kSubDiffCacheSize){
    initRead();
    streamImport=this;
    if (isOnlySubCover){
        streamSize=0;
        for (size_t i=0;i<covers.coverCount();++i){
            hpatch_TCover cover;
            covers.covers(i,&cover);
            streamSize+=cover.length;
        }
    }else{
        streamSize=newData->streamSize;
    }
    read=_read;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, 0x48(%rdi)
movq %rdx, 0x50(%rdi)
movq %rcx, 0x58(%rdi)
movb %bpl, 0x60(%rdi)
movb %r9b, 0x61(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rdi)
movq $0x0, 0x78(%rdi)
movl $0x80000, %edi          # imm = 0x80000
callq 0x4400
testq %rax, %rax
je 0x23cc8
movq %rax, 0x68(%rbx)
addq $0x80000, %rax          # imm = 0x80000
movq %rax, 0x70(%rbx)
movq %rax, 0x78(%rbx)
xorl %eax, %eax
movq %rax, 0x20(%rbx)
movq $-0x1, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movq %rax, 0x40(%rbx)
movq %rbx, (%rbx)
testb %bpl, %bpl
je 0x23caa
movq $0x0, 0x8(%rbx)
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x23cb2
movb 0x20(%r14), %cl
movq 0x10(%r14), %rdx
movl $0x8, %esi
xorl %edi, %edi
testb %cl, %cl
je 0x23c94
movl (%rdx,%rsi), %r8d
jmp 0x23c98
movq (%rdx,%rsi,2), %r8
addq %r8, %rdi
movq %rdi, 0x8(%rbx)
addq $0xc, %rsi
decq %rax
jne 0x23c8a
jmp 0x23cb2
movq 0x8(%r15), %rax
movq %rax, 0x8(%rbx)
leaq 0x6f(%rip), %rax        # 0x23d28
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x38633(%rip), %rsi     # 0x5c30f
movq %rax, %rdi
callq 0x4110
movq 0x582fd(%rip), %rsi     # 0x7bfe8
movq 0x582c6(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TNewDataSubDiffStream::_read(hpatch_TStreamInput const*, unsigned long long, unsigned char*, unsigned char*)
hpatch_BOOL TNewDataSubDiffStream::_read(const struct hpatch_TStreamInput* stream,hpatch_StreamPos_t readFromPos,
                                             unsigned char* out_data,unsigned char* out_data_end){
    TNewDataSubDiffStream* self=(TNewDataSubDiffStream*)stream->streamImport;
    if (readFromPos==0) self->initRead();
    if (readFromPos!=self->curReadPos) return hpatch_FALSE;
    self->curReadPos+=(size_t)(out_data_end-out_data);
    assert(self->curReadPos<=self->streamSize);
    self->readTo(out_data,out_data_end);
    return hpatch_TRUE;
}

// Assembly:
pushq %rax
movq (%rdi), %rdi
testq %rsi, %rsi
je 0x23d37
movq 0x30(%rdi), %r8
jmp 0x23d51
xorl %r8d, %r8d
movq %r8, 0x20(%rdi)
movq $-0x1, 0x28(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movq %r8, 0x40(%rdi)
xorl %eax, %eax
cmpq %rsi, %r8
jne 0x23d7b
movq %rcx, %rax
subq %rdx, %rax
addq %rsi, %rax
movq %rax, 0x30(%rdi)
cmpq 0x8(%rdi), %rax
ja 0x23d7d
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x23d9c
movl $0x1, %eax
popq %rcx
retq
leaq 0x39972(%rip), %rdi     # 0x5d6f6
leaq 0x394e6(%rip), %rsi     # 0x5d271
leaq 0x39987(%rip), %rcx     # 0x5d719
movl $0x178, %edx            # imm = 0x178
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TNewDataSubDiffCoverStream::TNewDataSubDiffCoverStream(hpatch_TStreamInput const*, hpatch_TStreamInput const*, bool)
TNewDataSubDiffCoverStream::TNewDataSubDiffCoverStream(const hpatch_TStreamInput* _newStream,
                                                       const hpatch_TStreamInput* _oldStream,
                                                       bool _isZeroSubDiff)
:isZeroSubDiff(_isZeroSubDiff),newStream(_newStream),oldStream(_oldStream),
newData(0),oldData(0),_cache(_isZeroSubDiff?0:kSubDiffCacheSize*2){
    setCover(cover,0,0,0);
    streamImport=this;
    read=_read;
    if (!isZeroSubDiff){
        newData=_cache.data();
        oldData=_cache.data()+kSubDiffCacheSize;
    }
    initRead();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb %cl, 0x20(%rdi)
movq %rsi, 0x38(%rdi)
movq %rdx, 0x40(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movq $0x0, 0x80(%rdi)
testl %ecx, %ecx
je 0x240dc
movups %xmm0, 0x48(%rbx)
movq $0x0, 0x58(%rbx)
movq %rbx, (%rbx)
leaq 0xb0(%rip), %rax        # 0x24186
movq %rax, 0x10(%rbx)
jmp 0x2412c
movl $0x100000, %edi         # imm = 0x100000
callq 0x4400
testq %rax, %rax
je 0x24140
movq %rax, 0x70(%rbx)
leaq 0x100000(%rax), %rcx
movq %rcx, 0x78(%rbx)
movq %rcx, 0x80(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rbx)
movq $0x0, 0x58(%rbx)
movq %rbx, (%rbx)
leaq 0x6c(%rip), %rcx        # 0x24186
movq %rcx, 0x10(%rbx)
movq %rax, 0x60(%rbx)
addq $0x80000, %rax          # imm = 0x80000
movq %rax, 0x68(%rbx)
movq $0x0, 0x8(%rbx)
movups %xmm0, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x381bb(%rip), %rsi     # 0x5c30f
movq %rax, %rdi
callq 0x4110
movq 0x57e85(%rip), %rsi     # 0x7bfe8
movq 0x57e4e(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TNewDataSubDiffCoverStream::resetCoverLen(unsigned long long)
void TNewDataSubDiffCoverStream::resetCoverLen(hpatch_StreamPos_t coverLen){
    const hpatch_StreamPos_t skipLen=cover.length-(curDataLen+inStreamLen);
    if (coverLen<=skipLen){ // all cache data invalid
        cover.length=coverLen;
        initRead();
    }else{
        if (coverLen<skipLen+curDataLen)
            curDataLen=(size_t)(coverLen-skipLen);
        inStreamLen=coverLen-(skipLen+curDataLen);
        cover.length=coverLen;
        streamSize=coverLen;
    }
}

// Assembly:
movq 0x30(%rdi), %rcx
movq 0x58(%rdi), %rax
movq 0x28(%rdi), %rdx
addq %rcx, %rdx
subq %rdx, %rax
movq %rsi, %rdx
subq %rax, %rdx
jbe 0x2421e
addq %rcx, %rax
cmpq %rsi, %rax
jbe 0x2420b
movq %rdx, 0x30(%rdi)
movq %rsi, %rax
movq %rsi, %rcx
subq %rax, %rcx
movq %rcx, 0x28(%rdi)
movq %rsi, 0x58(%rdi)
movq %rsi, 0x8(%rdi)
retq
movq %rsi, 0x58(%rdi)
movq %rsi, 0x8(%rdi)
movq %rsi, 0x28(%rdi)
movq $0x0, 0x30(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TNewDataSubDiffCoverStream::readTo(unsigned long long, unsigned char*, unsigned char*)
hpatch_BOOL TNewDataSubDiffCoverStream::readTo(hpatch_StreamPos_t readFromPos,
                                               unsigned char* out_data,unsigned char* out_data_end){
    // newStream:[       |                                          |              ]
    //              cover.newPos                        cover.newPos+cover.length
    // _cache:           |  skipLen  [  curDataLen  ]  inStreamLen  |
    //                                          |
    //                                     readFromPos   
    while (out_data!=out_data_end){
        hpatch_StreamPos_t skipLen=cover.length-(curDataLen+inStreamLen);
        if ((readFromPos<skipLen)||(readFromPos>=(skipLen+curDataLen))){
            if (!_updateCache(readFromPos)) return hpatch_FALSE;
            skipLen=cover.length-(curDataLen+inStreamLen);
        }
        size_t srcPos=(size_t)(readFromPos-skipLen);
        size_t len=std::min((size_t)(curDataLen-srcPos),(size_t)(out_data_end-out_data));
        for (size_t i=0;i<len;i++)
            out_data[i]=newData[srcPos+i]-oldData[srcPos+i];
        readFromPos+=len;
        out_data+=len;
    }
    return hpatch_TRUE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x1, %ebx
cmpq %rcx, %rdx
je 0x242ea
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x30(%r13), %rcx
movq 0x58(%r13), %rax
movq 0x28(%r13), %rdx
addq %rcx, %rdx
subq %rdx, %rax
cmpq %rax, %r12
jb 0x24277
leaq (%rax,%rcx), %rdx
cmpq %rdx, %r12
jb 0x24298
movq %r13, %rdi
movq %r12, %rsi
callq 0x242f6
testl %eax, %eax
je 0x242e8
movq 0x30(%r13), %rcx
movq 0x58(%r13), %rax
movq 0x28(%r13), %rdx
addq %rcx, %rdx
subq %rdx, %rax
movq %r12, %rdx
subq %rax, %rdx
subq %rdx, %rcx
movq %r14, %rax
subq %r15, %rax
cmpq %rcx, %rax
cmovaeq %rcx, %rax
testq %rax, %rax
je 0x242d7
movq %r15, %rcx
movq %rax, %rsi
movq 0x60(%r13), %rdi
movq 0x68(%r13), %r8
movb (%rdi,%rdx), %dil
subb (%r8,%rdx), %dil
movb %dil, (%rcx)
incq %rcx
incq %rdx
decq %rsi
jne 0x242b9
addq %rax, %r12
addq %rax, %r15
cmpq %r14, %r15
jne 0x24257
jmp 0x242ea
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TNewDataSubDiffCoverStream::_updateCache(unsigned long long)
hpatch_BOOL TNewDataSubDiffCoverStream::_updateCache(hpatch_StreamPos_t readFromPos){
    assert(readFromPos<cover.length);
    curDataLen=kSubDiffCacheSize;
    if (curDataLen+readFromPos>cover.length)
        curDataLen=(size_t)(cover.length-readFromPos);
    inStreamLen=cover.length-(curDataLen+readFromPos);
    if (!newStream->read(newStream,cover.newPos+readFromPos,newData,newData+curDataLen))
        return hpatch_FALSE;
    if (!oldStream->read(oldStream,cover.oldPos+readFromPos,oldData,oldData+curDataLen))
        return hpatch_FALSE;
    return hpatch_TRUE;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x58(%rdi), %rax
movq %rax, %rcx
subq %rsi, %rcx
jbe 0x24370
movq %rsi, %rbx
movq %rdi, %r14
movl $0x80000, %edx          # imm = 0x80000
addq %rdx, %rsi
cmpq %rax, %rsi
cmovbeq %rdx, %rcx
movq %rcx, 0x30(%rdi)
subq %rcx, %rax
subq %rbx, %rax
movq %rax, 0x28(%rdi)
movq 0x50(%rdi), %rsi
addq %rbx, %rsi
movq 0x38(%rdi), %rdi
movq 0x60(%r14), %rdx
addq %rdx, %rcx
callq *0x10(%rdi)
testl %eax, %eax
je 0x24366
addq 0x48(%r14), %rbx
movq 0x40(%r14), %rdi
movq 0x68(%r14), %rdx
movq 0x30(%r14), %rcx
addq %rdx, %rcx
movq %rbx, %rsi
callq *0x10(%rdi)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x24368
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3943b(%rip), %rdi     # 0x5d7b2
leaq 0x38ef3(%rip), %rsi     # 0x5d271
leaq 0x39446(%rip), %rcx     # 0x5d7cb
movl $0x1ce, %edx            # imm = 0x1CE
callq 0x4200
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TStepStream::TStepStream(hpatch_TStreamInput const*, hpatch_TStreamInput const*, bool, hdiff_private::TCovers const&, unsigned long)
TStepStream::TStepStream(const hpatch_TStreamInput* newStream,const hpatch_TStreamInput* oldStream,
                         bool isZeroSubDiff,const TCovers& _covers,size_t _patchStepMemSize)
:subDiff(newStream,oldStream,isZeroSubDiff),newDataDiff(_covers,newStream),
covers(_covers),patchStepMemSize(_patchStepMemSize),newDataSize(newStream->streamSize),
readFromPosBack(0),readBufPos(0){
    initStream();
    streamImport=this;
    read=_read;
    streamSize=sumBufSize_forInit;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, %r14
movq %r8, %r15
movq %rsi, %r12
movq %rdi, %rbx
addq $0x20, %rdi
callq 0x24094
leaq 0xa8(%rbx), %r13
movq %r15, 0xc8(%rbx)
movq %r12, 0xd0(%rbx)
movq 0x8(%r12), %rsi
movq %r15, %rdi
callq 0x23b46
xorps %xmm0, %xmm0
movups %xmm0, 0xd8(%rbx)
movups %xmm0, 0xe8(%rbx)
movups %xmm0, 0xf8(%rbx)
xorl %ecx, %ecx
movq %rcx, 0x108(%rbx)
movq %r13, 0xa8(%rbx)
movq %rax, 0xb0(%rbx)
leaq -0xb4c(%rip), %rax      # 0x238ba
movq %rax, 0xb8(%rbx)
movq %rcx, 0xc0(%rbx)
movq %r15, 0x110(%rbx)
movq %r14, 0x118(%rbx)
movq 0x8(%r12), %rax
movq %rax, 0x120(%rbx)
movq %rcx, 0x258(%rbx)
movups %xmm0, 0x248(%rbx)
leaq 0x260(%rbx), %r15
movq %rcx, 0x2a0(%rbx)
movups %xmm0, 0x198(%rbx)
movups %xmm0, 0x188(%rbx)
movups %xmm0, 0x178(%rbx)
movups %xmm0, 0x168(%rbx)
movups %xmm0, 0x158(%rbx)
movq %r15, %rdi
callq 0x25d20
movq $0x0, 0x268(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x2b0(%rbx)
movq %rbx, %rdi
callq 0x24540
movq %rbx, (%rbx)
leaq 0xf8(%rip), %rax        # 0x24594
movq %rax, 0x10(%rbx)
movq 0x238(%rbx), %rax
movq %rax, 0x8(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, %rdi
callq 0x15506
jmp 0x244c5
movq %rax, %r14
leaq 0x158(%rbx), %r12
leaq 0x170(%rbx), %r15
leaq 0x248(%rbx), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x244f1
movq 0x258(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq %r15, %rdi
callq 0x25f4e
movq (%r12), %rdi
testq %rdi, %rdi
je 0x24511
movq 0x168(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x24537
addq $0x90, %rbx
callq 0x43b0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TStepStream::initStream()
void TStepStream::initStream(){
    isInInit=true;
    sumBufSize_forInit=0;
    beginStep();
    while(doStep()) { }
    isInInit=false;
    endCoverCount=curCoverCount;
    endMaxStepMemSize=curMaxStepMemSize;
    beginStep();
    //assert(buf.empty());
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movb $0x1, 0x230(%rdi)
movq $0x0, 0x238(%rdi)
callq 0x2462c
movq %rbx, %rdi
callq 0x24794
testb %al, %al
jne 0x2455b
movb $0x0, 0x230(%rbx)
movq 0x128(%rbx), %rax
movq 0x138(%rbx), %rcx
movq %rax, 0x130(%rbx)
movq %rcx, 0x140(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x2462c
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TStepStream::_read(hpatch_TStreamInput const*, unsigned long long, unsigned char*, unsigned char*)
hpatch_BOOL TStepStream::_read(const hpatch_TStreamInput* stream,hpatch_StreamPos_t readFromPos,
                               unsigned char* out_data,unsigned char* out_data_end){
    TStepStream* self=(TStepStream*)stream->streamImport;
    if (readFromPos!=self->readFromPosBack){
        check(readFromPos==0);
        self->beginStep();
    }
    self->readFromPosBack=readFromPos+(size_t)(out_data_end-out_data);
    return self->readTo(out_data,out_data_end);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq (%rdi), %r12
cmpq %rsi, 0x2b0(%r12)
je 0x245bf
testq %r15, %r15
jne 0x245e6
movq %r12, %rdi
callq 0x2462c
subq %r14, %r15
addq %rbx, %r15
movq %r15, 0x2b0(%r12)
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x24dbc
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x39244(%rip), %rsi     # 0x5d83e
movq %rax, %rdi
callq 0x4110
movq 0x579df(%rip), %rsi     # 0x7bfe8
movq 0x579a8(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TStepStream::beginStep()
void TStepStream::beginStep(){
    curCoverCount=covers.coverCount();
    isHaveLeftCover=false;
    isHaveRightCover=false;
    isHaveLastCover=false;
    if (curCoverCount==0){
        isHaveLastCover=true;
        setCover(lastCover,0,newDataSize,0);
    }else{
        TCover back;
        covers.covers(curCoverCount-1,&back);
        if (back.newPos+back.length<newDataSize){
            isHaveLastCover=true;
            setCover(lastCover,back.oldPos+back.length,newDataSize,0);
        }
    }
    if (isHaveLastCover) ++curCoverCount;

    step_buf.clear();
    step_dataDiff.clear();
    readBufPos=0;
    curMaxStepMemSize=0;
    lastOldEnd=0;
    lastNewEnd=0;
    step_bufCover.clear();
    step_bufCover_size=0;
    step_bufRle.clear();
    step_dataDiffSize=0;
    newDataDiffReadPos=0;
    cur_i=0;
    pCurCover=0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x110(%rdi), %rcx
movq 0x18(%rcx), %rax
movq %rax, 0x128(%rdi)
movb $0x0, 0x1ba(%rdi)
movw $0x0, 0x1b8(%rdi)
testq %rax, %rax
je 0x24676
leaq -0x1(%rax), %rsi
movq 0x10(%rcx), %rdx
cmpb $0x1, 0x20(%rcx)
jne 0x24691
leaq (%rsi,%rsi,2), %rdi
movl (%rdx,%rdi,4), %ecx
movl 0x4(%rdx,%rdi,4), %esi
movl 0x8(%rdx,%rdi,4), %edx
jmp 0x246a3
movb $0x1, 0x1b8(%rbx)
movq 0x120(%rbx), %rdi
movq $0x0, 0x1c0(%rbx)
jmp 0x246c3
leaq (%rsi,%rsi,2), %rdi
movq (%rdx,%rdi,8), %rcx
movq 0x8(%rdx,%rdi,8), %rsi
movq 0x10(%rdx,%rdi,8), %rdx
addq %rdx, %rsi
movq 0x120(%rbx), %rdi
cmpq %rdi, %rsi
jae 0x246df
movb $0x1, 0x1b8(%rbx)
addq %rdx, %rcx
movq %rcx, 0x1c0(%rbx)
movq %rdi, 0x1c8(%rbx)
movq $0x0, 0x1d0(%rbx)
incq %rax
movq %rax, 0x128(%rbx)
movq 0x248(%rbx), %rax
cmpq %rax, 0x250(%rbx)
je 0x246f6
movq %rax, 0x250(%rbx)
leaq 0x260(%rbx), %rdi
callq 0x25d20
xorl %eax, %eax
movq %rax, 0x268(%rbx)
movq %rax, 0x2b8(%rbx)
movq %rax, 0x138(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x148(%rbx)
movq 0x158(%rbx), %rax
cmpq %rax, 0x160(%rbx)
je 0x2473a
movq %rax, 0x160(%rbx)
movq $0x0, 0x240(%rbx)
movq 0x170(%rbx), %rax
cmpq %rax, 0x178(%rbx)
je 0x2475c
movq %rax, 0x178(%rbx)
movq 0x188(%rbx), %rax
cmpq %rax, 0x190(%rbx)
je 0x24773
movq %rax, 0x190(%rbx)
xorl %eax, %eax
movq %rax, 0x208(%rbx)
movq %rax, 0x228(%rbx)
movups %xmm0, 0x1a0(%rbx)
movq %rax, 0x1b0(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TStepStream::_last_flush_step()
void TStepStream::_last_flush_step(){
    if (step_bufCover_size>0){
        step_dataDiff.reset(&newDataDiff,newDataDiffReadPos-step_dataDiffSize,newDataDiffReadPos);
        step_dataDiffSize=0;
        _flush_step_code();
    }else{
        assert(step_dataDiff.streamSize==0);
        assert(step_dataDiffSize==0);
    }
    assert(curMaxStepMemSize<=patchStepMemSize);
    assert(newDataDiffReadPos==newDataDiff.streamSize);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x240(%rdi)
je 0x24fe5
leaq 0x260(%rbx), %rdi
leaq 0xa8(%rbx), %rsi
movq 0x1b0(%rbx), %rcx
movq %rcx, %rdx
subq 0x1a8(%rbx), %rdx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x25098
movq $0x0, 0x1a8(%rbx)
movq %rbx, %rdi
callq 0x2516c
jmp 0x24ff9
cmpq $0x0, 0x268(%rbx)
jne 0x25059
cmpq $0x0, 0x1a8(%rbx)
jne 0x25078
movq 0x138(%rbx), %rax
cmpq 0x118(%rbx), %rax
ja 0x2501b
movq 0x1b0(%rbx), %rax
cmpq 0xb0(%rbx), %rax
jne 0x2503a
popq %rbx
retq
leaq 0x388e6(%rip), %rdi     # 0x5d908
leaq 0x38248(%rip), %rsi     # 0x5d271
leaq 0x3888f(%rip), %rcx     # 0x5d8bf
movl $0x2a3, %edx            # imm = 0x2A3
callq 0x4200
leaq 0x388eb(%rip), %rdi     # 0x5d92c
leaq 0x38229(%rip), %rsi     # 0x5d271
leaq 0x38870(%rip), %rcx     # 0x5d8bf
movl $0x2a4, %edx            # imm = 0x2A4
callq 0x4200
leaq 0x38843(%rip), %rdi     # 0x5d8a3
leaq 0x3820a(%rip), %rsi     # 0x5d271
leaq 0x38851(%rip), %rcx     # 0x5d8bf
movl $0x2a0, %edx            # imm = 0x2A0
callq 0x4200
leaq 0x38874(%rip), %rdi     # 0x5d8f3
leaq 0x381eb(%rip), %rsi     # 0x5d271
leaq 0x38832(%rip), %rcx     # 0x5d8bf
movl $0x2a1, %edx            # imm = 0x2A1
callq 0x4200
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TStreamClip::reset(hpatch_TStreamInput const*, unsigned long long, unsigned long long, hpatch_TDecompress*, unsigned long long)
void TStreamClip::reset(const hpatch_TStreamInput* stream,
                        hpatch_StreamPos_t clipBeginPos,hpatch_StreamPos_t clipEndPos,
                        hpatch_TDecompress* decompressPlugin,hpatch_StreamPos_t uncompressSize){
    clear();
    assert(clipBeginPos<=clipEndPos);
    assert(clipEndPos<=stream->streamSize);
    _src=stream;
    _src_begin=clipBeginPos;
    _src_end=clipEndPos;
    _decompressPlugin=decompressPlugin;
    _decompressHandle=0;
    _read_uncompress_pos=0;
    if ((uncompressSize==0)&&(decompressPlugin==0))
        uncompressSize=clipEndPos-clipBeginPos;
    this->streamImport=this;
    this->streamSize=uncompressSize;
    this->read=_clip_read;

    if (decompressPlugin)
        openDecompressHandle();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
callq 0x25d20
movq $0x0, 0x8(%rbx)
movq %r12, %rax
subq %r13, %rax
jb 0x2512d
cmpq %r12, 0x8(%rbp)
jb 0x2514c
movq %rbp, 0x20(%rbx)
movq %r13, 0x28(%rbx)
movq %r12, 0x30(%rbx)
movq %r14, %rcx
orq %r15, %rcx
cmovneq %r15, %rax
movq %r14, 0x38(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
movq %rbx, (%rbx)
movq %rax, 0x8(%rbx)
leaq 0xa31(%rip), %rax       # 0x25b30
movq %rax, 0x10(%rbx)
testq %r14, %r14
je 0x2511e
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x25c62
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x38bbb(%rip), %rdi     # 0x5dcef
leaq 0x38136(%rip), %rsi     # 0x5d271
leaq 0x38bc6(%rip), %rcx     # 0x5dd08
movl $0x32a, %edx            # imm = 0x32A
callq 0x4200
leaq 0x38c4b(%rip), %rdi     # 0x5dd9e
leaq 0x38117(%rip), %rsi     # 0x5d271
leaq 0x38ba7(%rip), %rcx     # 0x5dd08
movl $0x32b, %edx            # imm = 0x32B
callq 0x4200
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TDiffStream::pushBack(unsigned char const*, unsigned long)
void TDiffStream::pushBack(const unsigned char* src,size_t n){
    if (n==0) return;
    checki(out_diff->write(out_diff,writePos,src,src+n),
           "TDiffStream::pushBack() write stream error!");
    writePos+=n;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdx, %rdx
je 0x254f6
movq %rsi, %rdx
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x8(%r14), %rsi
leaq (%rdx,%rbx), %rcx
callq *0x18(%rdi)
testl %eax, %eax
je 0x254fe
addq %rbx, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x384b3(%rip), %rsi     # 0x5d9c5
movq %rax, %rdi
callq 0x4110
movq 0x56ac7(%rip), %rsi     # 0x7bfe8
movq 0x56a90(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TDiffStream::packUInt(unsigned long long)
size_t TDiffStream::packUInt(hpatch_StreamPos_t uValue){
    unsigned char  codeBuf[hpatch_kMaxPackedUIntBytes];
    unsigned char* codeEnd=codeBuf;
    check(hpatch_packUInt(&codeEnd,codeBuf+hpatch_kMaxPackedUIntBytes,uValue));
    pushBack(codeBuf,(size_t)(codeEnd-codeBuf));
    return codeEnd-codeBuf;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rdx
movq %rdi, %r14
leaq 0xd(%rsp), %rbx
movq %rsp, %rdi
movq %rbx, (%rdi)
leaq 0x18(%rsp), %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x43254
testl %eax, %eax
je 0x25590
movq (%rsp), %rdx
subq %rbx, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x254ce
movq (%rsp), %rax
subq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x3844d(%rip), %rsi     # 0x5d9f1
movq %rax, %rdi
callq 0x4110
movq 0x56a35(%rip), %rsi     # 0x7bfe8
movq 0x569fe(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TDiffStream::_packUInt_limit(unsigned long long, unsigned long)
void TDiffStream::_packUInt_limit(hpatch_StreamPos_t uValue,size_t limitOutSize){
    check(limitOutSize<=hpatch_kMaxPackedUIntBytes);
    unsigned char  _codeBuf[hpatch_kMaxPackedUIntBytes];
    packUInt_fixSize(_codeBuf,_codeBuf+limitOutSize,uValue);
    pushBack(_codeBuf,limitOutSize);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
cmpq $0xc, %rdx
jae 0x25630
testq %rdx, %rdx
je 0x2564e
leaq (%rsp,%rdx), %rax
addq $0xc, %rax
movl %esi, %ecx
andb $0x7f, %cl
movb %cl, (%rax)
leaq 0xd(%rsp), %rcx
cmpq %rcx, %rax
jbe 0x25615
shrq $0x7, %rsi
movl %esi, %r8d
orb $-0x80, %r8b
movb %r8b, -0x1(%rax)
decq %rax
jmp 0x255fc
cmpq $0x80, %rsi
jae 0x2566c
leaq 0xd(%rsp), %rsi
callq 0x254ce
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x383fe(%rip), %rsi     # 0x5da42
movq %rax, %rdi
callq 0x4110
jmp 0x25688
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x38a83(%rip), %rsi     # 0x5e0e5
movq %rax, %rdi
callq 0x4110
jmp 0x25688
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x38a8d(%rip), %rsi     # 0x5e10d
movq %rax, %rdi
callq 0x4110
movq 0x56959(%rip), %rsi     # 0x7bfe8
movq 0x56922(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
jmp 0x256a2
jmp 0x256a2
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TDiffStream::packUInt_update(hdiff_private::TPlaceholder const&, unsigned long long)
void TDiffStream::packUInt_update(const TPlaceholder& pos,hpatch_StreamPos_t uValue){
    hpatch_StreamPos_t writePosBack=writePos;
    writePos=pos.pos;
    _packUInt_limit(uValue,(size_t)(pos.pos_end-pos.pos));
    assert(writePos==pos.pos_end);
    writePos=writePosBack;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %r15
movq (%rsi), %rcx
movq %rcx, 0x8(%rdi)
movq 0x8(%rsi), %rax
subq %rcx, %rax
movq %rdx, %rsi
movq %rax, %rdx
callq 0x255d6
movq 0x8(%rbx), %rax
cmpq 0x8(%r14), %rax
jne 0x256f2
movq %r15, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x3837f(%rip), %rdi     # 0x5da78
leaq 0x37b71(%rip), %rsi     # 0x5d271
leaq 0x38387(%rip), %rcx     # 0x5da8e
movl $0x2e3, %edx            # imm = 0x2E3
callq 0x4200
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TDiffStream::stream_read(hdiff_private::TPlaceholder const&, unsigned char*)
void TDiffStream::stream_read(const TPlaceholder& pos,hpatch_byte* out_data){
    assert(pos.pos<=pos.pos_end);
    assert(pos.size()==(size_t)pos.size());
    check(pos.pos_end<=writePos);
    checki(out_diff->read_writed!=0,"TDiffStream::stream_read() out_diff can't read error!");
    checki(out_diff->read_writed(out_diff,pos.pos,out_data,out_data+(size_t)pos.size()),
            "TDiffStream::stream_read() out_diff read error!");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq (%rsi), %rsi
movq 0x8(%rax), %rax
movq %rax, %rcx
subq %rsi, %rcx
jb 0x2574b
cmpq 0x8(%rdi), %rax
ja 0x2576a
movq (%rdi), %rdi
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x25788
addq %rdx, %rcx
callq *%rax
testl %eax, %eax
je 0x257a6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x38397(%rip), %rdi     # 0x5dae9
leaq 0x37b18(%rip), %rsi     # 0x5d271
leaq 0x3839e(%rip), %rcx     # 0x5dafe
movl $0x2e8, %edx            # imm = 0x2E8
callq 0x4200
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x383d2(%rip), %rsi     # 0x5db50
movq %rax, %rdi
callq 0x4110
jmp 0x257c2
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x383d7(%rip), %rsi     # 0x5db73
movq %rax, %rdi
callq 0x4110
jmp 0x257c2
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x383ef(%rip), %rsi     # 0x5dba9
movq %rax, %rdi
callq 0x4110
movq 0x5681f(%rip), %rsi     # 0x7bfe8
movq 0x567e8(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
jmp 0x257dc
jmp 0x257dc
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TDiffStream::stream_update(hdiff_private::TPlaceholder const&, unsigned char const*)
void TDiffStream::stream_update(const TPlaceholder& pos,const hpatch_byte* in_data){
    assert(pos.pos<=pos.pos_end);
    assert(pos.size()==(size_t)pos.size());
    check(pos.pos_end<=writePos);

    hpatch_StreamPos_t writePosBack=writePos;
    writePos=pos.pos;
    pushBack(in_data,(size_t)pos.size());
    assert(writePos==pos.pos_end);
    writePos=writePosBack;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq (%rsi), %rcx
movq 0x8(%rsi), %rsi
movq %rsi, %rax
subq %rcx, %rax
jb 0x25839
movq %rdi, %rbx
movq 0x8(%rdi), %r15
cmpq %r15, %rsi
ja 0x25858
movq %rcx, 0x8(%rbx)
movq %rbx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
callq 0x254ce
movq 0x8(%rbx), %rax
cmpq 0x8(%r14), %rax
jne 0x2588a
movq %r15, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x382a9(%rip), %rdi     # 0x5dae9
leaq 0x37a2a(%rip), %rsi     # 0x5d271
leaq 0x3838b(%rip), %rcx     # 0x5dbd9
movl $0x2f0, %edx            # imm = 0x2F0
callq 0x4200
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x382e4(%rip), %rsi     # 0x5db50
movq %rax, %rdi
callq 0x4110
movq 0x5676d(%rip), %rsi     # 0x7bfe8
movq 0x56736(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
leaq 0x381e7(%rip), %rdi     # 0x5da78
leaq 0x379d9(%rip), %rsi     # 0x5d271
leaq 0x3833a(%rip), %rcx     # 0x5dbd9
movl $0x2f7, %edx            # imm = 0x2F7
callq 0x4200
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TDiffStream::_pushStream(hpatch_TStreamInput const*)
void TDiffStream::_pushStream(const hpatch_TStreamInput* stream){
    unsigned char* buf=_temp_mem.data();
    hpatch_StreamPos_t sumReadedLen=0;
    while (sumReadedLen<stream->streamSize) {
        size_t readLen=kBufSize;
        if (readLen+sumReadedLen>stream->streamSize)
            readLen=(size_t)(stream->streamSize-sumReadedLen);
        checki(stream->read(stream,sumReadedLen,buf,buf+readLen),
               "TDiffStream::_pushStream() stream->read() error!");
        this->pushBack(buf,readLen);
        sumReadedLen+=readLen;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rsi), %rax
testq %rax, %rax
je 0x25921
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %r15
xorl %r12d, %r12d
movl $0x80000, %ebp          # imm = 0x80000
leaq (%r12,%rbp), %rcx
movq %rax, %r13
subq %r12, %r13
cmpq %rax, %rcx
cmovbeq %rbp, %r13
leaq (%r15,%r13), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0x10(%rbx)
testl %eax, %eax
je 0x25930
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x254ce
addq %r13, %r12
movq 0x8(%rbx), %rax
cmpq %rax, %r12
jb 0x258e2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x382ef(%rip), %rsi     # 0x5dc33
movq %rax, %rdi
callq 0x4110
movq 0x56695(%rip), %rsi     # 0x7bfe8
movq 0x5665e(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TStreamClip::_clip_read(hpatch_TStreamInput const*, unsigned long long, unsigned char*, unsigned char*)
hpatch_BOOL TStreamClip::_clip_read(const hpatch_TStreamInput* stream,hpatch_StreamPos_t readFromPos,
                                    unsigned char* out_data,unsigned char* out_data_end){
    TStreamClip* self=(TStreamClip*)stream->streamImport;
    assert(out_data<out_data_end);
    if (readFromPos!=self->_read_uncompress_pos){
        if (self->_decompressPlugin){
            check(readFromPos==0); //not support random read compressed cdata
            //reset
            self->closeDecompressHandle();
            self->openDecompressHandle();
            self->_read_uncompress_pos=0;
        }else{
            self->_read_uncompress_pos=readFromPos;
        }
    }
    size_t readLen=out_data_end-out_data;
    assert(readFromPos+readLen <= self->streamSize);
    self->_read_uncompress_pos+=readLen;
    
    if (self->_decompressPlugin){
        return self->_decompressPlugin->decompress_part(self->_decompressHandle,out_data,out_data_end);
    }else{
        return self->_src->read(self->_src,self->_src_begin+readFromPos,out_data,out_data_end);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpq %rcx, %rdx
jae 0x25bde
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq (%rdi), %r12
cmpq %rsi, 0x48(%r12)
je 0x25b7f
cmpq $0x0, 0x38(%r12)
movq %r15, %rax
je 0x25b7a
testq %r15, %r15
jne 0x25c1c
movq %r12, %rdi
callq 0x25d20
movq %r12, %rdi
callq 0x25c62
xorl %eax, %eax
movq %rax, 0x48(%r12)
movq %rbx, %rax
subq %r14, %rax
addq %r15, %rax
cmpq 0x8(%r12), %rax
ja 0x25bfd
movq %rax, 0x48(%r12)
movq 0x38(%r12), %rax
testq %rax, %rax
je 0x25bba
movq 0x18(%rax), %rax
movq 0x40(%r12), %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rax
movq 0x20(%r12), %rdi
movq 0x10(%rdi), %rax
addq 0x28(%r12), %r15
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rax
leaq 0x38287(%rip), %rdi     # 0x5de6c
leaq 0x37685(%rip), %rsi     # 0x5d271
leaq 0x3828f(%rip), %rcx     # 0x5de82
movl $0x34c, %edx            # imm = 0x34C
callq 0x4200
leaq 0x3830b(%rip), %rdi     # 0x5df0f
leaq 0x37666(%rip), %rsi     # 0x5d271
leaq 0x38270(%rip), %rcx     # 0x5de82
movl $0x359, %edx            # imm = 0x359
callq 0x4200
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x37c0e(%rip), %rsi     # 0x5d83e
movq %rax, %rdi
callq 0x4110
movq 0x563a9(%rip), %rsi     # 0x7bfe8
movq 0x56372(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TStreamClip::openDecompressHandle()
void TStreamClip::openDecompressHandle(){
    assert(_decompressHandle==0);
    assert(_decompressPlugin!=0);
    _decompressHandle=_decompressPlugin->open(_decompressPlugin,this->streamSize,_src,_src_begin,_src_end);
    check(_decompressHandle!=0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x40(%rdi)
jne 0x25c9d
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x25cbc
movq 0x8(%rbx), %rsi
movq 0x20(%rbx), %rdx
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %r8
callq *0x8(%rdi)
movq %rax, 0x40(%rbx)
testq %rax, %rax
je 0x25cdb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3bc30(%rip), %rdi     # 0x618d4
leaq 0x375c6(%rip), %rsi     # 0x5d271
leaq 0x3814b(%rip), %rcx     # 0x5ddfd
movl $0x343, %edx            # imm = 0x343
callq 0x4200
leaq 0x38172(%rip), %rdi     # 0x5de35
leaq 0x375a7(%rip), %rsi     # 0x5d271
leaq 0x3812c(%rip), %rcx     # 0x5ddfd
movl $0x344, %edx            # imm = 0x344
callq 0x4200
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x3815b(%rip), %rsi     # 0x5de4a
movq %rax, %rdi
callq 0x4110
movq 0x562ea(%rip), %rsi     # 0x7bfe8
movq 0x562b3(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::TStreamClip::closeDecompressHandle()
void TStreamClip::closeDecompressHandle(){
    hpatch_decompressHandle handle=_decompressHandle;
    _decompressHandle=0;
    if (handle)
        check(_decompressPlugin->close(_decompressPlugin,handle));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x40(%rdi), %rsi
movq $0x0, 0x40(%rdi)
testq %rsi, %rsi
je 0x25d40
movq 0x38(%rdi), %rdi
callq *0x10(%rdi)
testl %eax, %eax
je 0x25d48
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x38061(%rip), %rsi     # 0x5ddbd
movq %rax, %rdi
callq 0x4110
movq 0x5627d(%rip), %rsi     # 0x7bfe8
movq 0x56246(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::_TCheckOutNewDataStream::_TCheckOutNewDataStream(hpatch_TStreamInput const*, unsigned char*, unsigned long)
_TCheckOutNewDataStream::_TCheckOutNewDataStream(const hpatch_TStreamInput*  _newData,
                                                 unsigned char* _buf,size_t _bufSize)
:newData(_newData),writedLen(0),buf(_buf),bufSize(_bufSize){
    streamImport=this;
    streamSize=newData->streamSize;
    read_writed=_read_writed;
    write=_write_check;
}

// Assembly:
movq %rsi, 0x20(%rdi)
movq $0x0, 0x28(%rdi)
movq %rdx, 0x30(%rdi)
movq %rcx, 0x38(%rdi)
movq %rdi, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
leaq 0x10(%rip), %rax        # 0x25dc4
movq %rax, 0x10(%rdi)
leaq 0x39(%rip), %rax        # 0x25df8
movq %rax, 0x18(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::_TCheckOutNewDataStream::_read_writed(hpatch_TStreamOutput const*, unsigned long long, unsigned char*, unsigned char*)
hpatch_BOOL _TCheckOutNewDataStream::_read_writed(const struct hpatch_TStreamOutput* stream,hpatch_StreamPos_t readFromPos,
                                                  unsigned char* out_data,unsigned char* out_data_end){
    _TCheckOutNewDataStream* self=(_TCheckOutNewDataStream*)stream->streamImport;
    _test_rt(readFromPos<=self->writedLen);
    _test_rt((hpatch_size_t)(out_data_end-out_data)<=(hpatch_StreamPos_t)(self->writedLen-readFromPos)); 
    return self->newData->read(self->newData,readFromPos,out_data,out_data_end); 
}

// Assembly:
pushq %rax
movq (%rdi), %rax
movq 0x28(%rax), %rdi
subq %rsi, %rdi
jb 0x25de8
movq %rcx, %r8
subq %rdx, %r8
cmpq %rdi, %r8
ja 0x25def
movq 0x20(%rax), %rdi
movq 0x10(%rdi), %rax
popq %r8
jmpq *%rax
callq 0x4914
jmp 0x25df4
callq 0x48f8
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::_TCheckOutNewDataStream::_write_check(hpatch_TStreamOutput const*, unsigned long long, unsigned char const*, unsigned char const*)
hpatch_BOOL _TCheckOutNewDataStream::_write_check(const hpatch_TStreamOutput* stream,hpatch_StreamPos_t writeToPos,
                                                  const unsigned char* data,const unsigned char* data_end){
    _TCheckOutNewDataStream* self=(_TCheckOutNewDataStream*)stream->streamImport;
    _test_rt(self->writedLen==writeToPos);
    self->writedLen+=(size_t)(data_end-data);
    _test_rt(self->writedLen<=self->streamSize);
    
    hpatch_StreamPos_t readPos=writeToPos;
    while (data<data_end) {
        size_t readLen=(size_t)(data_end-data);
        if (readLen>self->bufSize) readLen=self->bufSize;
        _test_rt(self->newData->read(self->newData,readPos,self->buf,self->buf+readLen));
        _test_rt(0==memcmp(data,self->buf,readLen));
        data+=readLen;
        readPos+=readLen;
    }
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rbx
cmpq %rsi, 0x28(%rbx)
jne 0x25e86
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rcx, %rax
subq %rdx, %rax
addq %rsi, %rax
movq %rax, 0x28(%rbx)
cmpq 0x8(%rbx), %rax
ja 0x25e8d
movl $0x1, %eax
cmpq %r14, %r15
jae 0x25ea2
movq 0x30(%rbx), %r13
movq %r14, %rbp
subq %r15, %rbp
movq 0x20(%rbx), %rdi
movq 0x38(%rbx), %rax
cmpq %rax, %rbp
cmovaeq %rax, %rbp
movq %r13, %rcx
addq %rbp, %rcx
movq %r12, %rsi
movq %r13, %rdx
callq *0x10(%rdi)
testl %eax, %eax
je 0x25e94
movq 0x30(%rbx), %r13
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x4310
testl %eax, %eax
jne 0x25e9b
addq %rbp, %r15
addq %rbp, %r12
cmpq %r14, %r15
jb 0x25e36
movl $0x1, %eax
jmp 0x25ea2
callq 0x4930
jmp 0x25ea0
callq 0x4984
jmp 0x25ea0
callq 0x4968
jmp 0x25ea0
callq 0x494c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.cpp
// Function: hdiff_private::do_compress(std::vector<unsigned char, std::allocator<unsigned char>>&, hpatch_TStreamInput const*, hdiff_TCompress const*, bool)
void do_compress(std::vector<unsigned char>& out_code,const hpatch_TStreamInput* data,
                        const hdiff_TCompress* compressPlugin,bool isMustCompress){
    out_code.clear();
    if (!compressPlugin) return;
    if (data->streamSize==0) return;
    hpatch_StreamPos_t maxCodeSize=compressPlugin->maxCompressedSize(data->streamSize);
    if ((maxCodeSize<=data->streamSize)||(maxCodeSize!=(size_t)maxCodeSize)) return; //error
    out_code.resize((size_t)maxCodeSize);
    hpatch_TStreamOutput codeStream;
    mem_as_hStreamOutput(&codeStream,out_code.data(),out_code.data()+out_code.size());
    hpatch_StreamPos_t codeSize=compressPlugin->compress(compressPlugin,&codeStream,data);
    if ((codeSize>0)&&(isMustCompress||(codeSize<data->streamSize)))
        out_code.resize((size_t)codeSize); //ok
    else
        out_code.clear();//error or cancel
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
cmpq %rax, 0x8(%rdi)
je 0x25ed5
movq %rax, 0x8(%rbx)
testq %r15, %r15
je 0x25f41
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x25f41
callq *0x8(%r15)
cmpq 0x8(%r14), %rax
jbe 0x25f41
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9b50
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rsp, %r12
movq %r12, %rdi
callq 0x433f7
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq *0x18(%r15)
testq %rax, %rax
je 0x25f34
testb %bpl, %bpl
jne 0x25f27
cmpq 0x8(%r14), %rax
jae 0x25f34
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9b50
jmp 0x25f41
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x25f41
movq %rax, 0x8(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/libdivsufsort/divsufsort.c.inc.h
// Function: sssort_thread(int*, int*, long long*, long long*, mt_data_t*)
static void _sssort_thread(saint_t* c0,saint_t* c1,saidx_t* j,
                           sastore_t *buf,mt_data_t* mt){
    saidx_t k = 0;
    saidx_t l;
    const saidx_t*  bucket_B=mt->bucket_B;
    for(;;) {
        {
            CAutoLocker __autoLocker(mt->locker.locker);
            if(0 < (l = *j)) {
                saint_t d0 = *c0, d1 = *c1;
                do {
                k = BUCKET_BSTAR(d0, d1);
                if(--d1 <= d0) {
                    d1 = ALPHABET_SIZE - 1;
                    if(--d0 < 0) { break; }
                }
                } while(((l - k) <= 1) && (0 < (l = k)));
                *c0 = d0, *c1 = d1, *j = k;
            }
        }
        if(l == 0) { break; }
        sastore_t* SA=mt->SA;
        sssort(mt->T, mt->PAb, SA + k, SA + l,
               buf, mt->bufsize, 2, mt->n, *(SA + k) == (mt->m - 1));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movq %rcx, 0x30(%rsp)
movq %rdx, %r15
movq %rsi, 0x18(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x18(%r8), %rbp
xorl %r12d, %r12d
leaq 0x20(%rsp), %r13
movq (%rbx), %rax
movq $0x0, (%rsp)
movb $0x0, 0x8(%rsp)
testq %rax, %rax
je 0x2c109
movq %rax, 0x20(%rsp)
movb $0x0, 0x28(%rsp)
movq %r13, %rdi
callq 0x2095c
movq 0x20(%rsp), %rax
movq (%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq %rax, (%rsp)
movb 0x8(%rsp), %al
movb %al, 0x28(%rsp)
movb $0x1, 0x8(%rsp)
movq %r13, %rdi
callq 0x20946
movq (%r15), %r14
testq %r14, %r14
jle 0x2c16e
movq 0x10(%rsp), %rax
movl (%rax), %edx
movq 0x18(%rsp), %rax
movl (%rax), %eax
movl %edx, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movslq %ecx, %rcx
movq (%rbp,%rcx,8), %r12
decl %eax
cmpl %edx, %eax
jle 0x2c138
movl %edx, %ecx
jmp 0x2c144
leal -0x1(%rdx), %ecx
movl $0xff, %eax
testl %edx, %edx
jle 0x2c15d
movq %r14, %rdx
subq %r12, %rdx
cmpq $0x1, %rdx
jg 0x2c15d
movq %r12, %r14
movl %ecx, %edx
testq %r12, %r12
jg 0x2c11f
movq %r12, %r14
movq 0x10(%rsp), %rdx
movl %ecx, (%rdx)
movq 0x18(%rsp), %rcx
movl %eax, (%rcx)
movq %r12, (%r15)
movq %rsp, %rdi
callq 0x20946
testq %r14, %r14
je 0x2c1c2
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rsi
leaq (%rax,%r12,8), %rdx
leaq (%rax,%r14,8), %rcx
movq 0x28(%rbx), %r9
movq 0x38(%rbx), %rax
decq %rax
xorl %r10d, %r10d
cmpq %rax, (%rdx)
sete %r10b
subq $0x8, %rsp
movq 0x38(%rsp), %r8
pushq %r10
pushq 0x30(%rbx)
pushq $0x2
callq 0x27065
addq $0x20, %rsp
jmp 0x2c0bb
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20946
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/lzma/C/Lzma2Enc.c
// Function: Lzma2EncProps_Init
void Lzma2EncProps_Init(CLzma2EncProps *p)
{
  LzmaEncProps_Init(&p->lzmaProps);
  p->blockSize = LZMA2_ENC_PROPS_BLOCK_SIZE_AUTO;
  p->numBlockThreads_Reduced = -1;
  p->numBlockThreads_Max = -1;
  p->numTotalThreads = -1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x32ccc
movq $0x0, 0x48(%rbx)
movq $-0x1, 0x50(%rbx)
movl $0xffffffff, 0x58(%rbx) # imm = 0xFFFFFFFF
popq %rbx
retq