LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x43bf5
testq %rsi, %rsi
je 0x43c14
movq %rcx, %rax
subq %rdx, %rax
jb 0x43c33
cmpq %rcx, 0x8(%rsi)
jb 0x43c52
movq %rsi, 0x20(%rdi)
movq %rdx, 0x28(%rdi)
movq %rdi, (%rdi)
movq %rax, 0x8(%rdi)
leaq 0x82(%rip), %rax        # 0x43c71
movq %rax, 0x10(%rdi)
popq %rax
retq
leaq 0x1d8e3(%rip), %rdi     # 0x614df
leaq 0x1d78b(%rip), %rsi     # 0x6138e
leaq 0x1d8dd(%rip), %rcx     # 0x614e7
movl $0x18f, %edx            # imm = 0x18F
callq 0x4200
leaq 0x1d940(%rip), %rdi     # 0x6155b
leaq 0x1d76c(%rip), %rsi     # 0x6138e
leaq 0x1d8be(%rip), %rcx     # 0x614e7
movl $0x190, %edx            # imm = 0x190
callq 0x4200
leaq 0x1a0b5(%rip), %rdi     # 0x5dcef
leaq 0x1d74d(%rip), %rsi     # 0x6138e
leaq 0x1d89f(%rip), %rcx     # 0x614e7
movl $0x191, %edx            # imm = 0x191
callq 0x4200
leaq 0x1d90f(%rip), %rdi     # 0x61568
leaq 0x1d72e(%rip), %rsi     # 0x6138e
leaq 0x1d880(%rip), %rcx     # 0x614e7
movl $0x192, %edx            # imm = 0x192
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/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 0x43cd9
testq %rsi, %rsi
je 0x43cf8
movq %rcx, %rax
subq %rdx, %rax
jb 0x43d17
cmpq %rcx, 0x8(%rsi)
jb 0x43d36
movq %rsi, 0x20(%rdi)
movq %rdx, 0x28(%rdi)
movq %rdi, (%rdi)
movq %rax, 0x8(%rdi)
leaq -0x57(%rip), %rax       # 0x43c71
movq %rax, 0x10(%rdi)
leaq 0x82(%rip), %rax        # 0x43d55
movq %rax, 0x18(%rdi)
popq %rax
retq
leaq 0x1d7ff(%rip), %rdi     # 0x614df
leaq 0x1d6a7(%rip), %rsi     # 0x6138e
leaq 0x1d89c(%rip), %rcx     # 0x6158a
movl $0x1a6, %edx            # imm = 0x1A6
callq 0x4200
leaq 0x1d85c(%rip), %rdi     # 0x6155b
leaq 0x1d688(%rip), %rsi     # 0x6138e
leaq 0x1d87d(%rip), %rcx     # 0x6158a
movl $0x1a7, %edx            # imm = 0x1A7
callq 0x4200
leaq 0x19fd1(%rip), %rdi     # 0x5dcef
leaq 0x1d669(%rip), %rsi     # 0x6138e
leaq 0x1d85e(%rip), %rcx     # 0x6158a
movl $0x1a8, %edx            # imm = 0x1A8
callq 0x4200
leaq 0x1d82b(%rip), %rdi     # 0x61568
leaq 0x1d64a(%rip), %rsi     # 0x6138e
leaq 0x1d83f(%rip), %rcx     # 0x6158a
movl $0x1a9, %edx            # imm = 0x1A9
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/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 0x20(%rdi), %rcx
subq (%rdi), %r15
movq 0x28(%rdi), %rax
subq %rcx, %rax
addq %rax, %r15
movl $0x104, %r12d           # imm = 0x104
cmpq %r12, %r15
cmovbq %r15, %r12
cmpq %r12, %rax
jae 0x43dd0
movq %rbx, %rdi
callq 0x43e2c
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x43e23
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rdx
subq %rcx, %rdx
cmpq %r12, %rdx
jb 0x43e23
movq 0x18(%rbx), %rsi
xorl %eax, %eax
testq %rsi, %rsi
je 0x43e23
testq %r15, %r15
je 0x43e23
addq %rcx, %rsi
cmpq $0x1, %r12
adcq $0x0, %r12
xorl %r15d, %r15d
cmpb %bpl, (%rsi,%r15)
je 0x43e00
incq %r15
cmpq %r15, %r12
jne 0x43dee
xorl %eax, %eax
jmp 0x43e23
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_O3/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 (%rdi), %rsi
movq 0x8(%rdi), %r12
subq %rsi, %r12
movq 0x20(%rdi), %rdi
cmpq %r12, %rdi
cmovbq %rdi, %r12
movl $0x1, %ebx
testq %r12, %r12
je 0x43ea1
movq 0x18(%r14), %r15
movq 0x28(%r14), %rdx
subq %rdi, %rdx
je 0x43e79
leaq (%r15,%rdi), %rsi
subq %r12, %rdi
addq %r15, %rdi
callq 0x4510
movq (%r14), %rsi
movq 0x28(%r14), %rdi
movq 0x10(%r14), %rax
movq %rdi, %rdx
subq %r12, %rdx
addq %r15, %rdx
addq %rdi, %r15
movq %rax, %rdi
movq %r15, %rcx
callq *0x10(%rax)
testl %eax, %eax
je 0x43e9f
subq %r12, 0x20(%r14)
addq %r12, (%r14)
jmp 0x43ea1
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
testq %rsi, %rsi
je 0x43f19
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rcx
movq 0x28(%rdi), %rdx
cmpq %rbx, %rdx
movq %rbx, %r15
cmovbq %rdx, %r15
movq %rdx, %rax
subq %rcx, %rax
cmpq %r15, %rax
jae 0x43eff
movq %r14, %rdi
callq 0x43e2c
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x43f21
movq 0x20(%r14), %rcx
movq 0x28(%r14), %rdx
movq %rdx, %rsi
subq %rcx, %rsi
cmpq %r15, %rsi
jb 0x43f21
cmpq $0x0, 0x18(%r14)
je 0x43f1f
addq %r15, %rcx
movq %rcx, 0x20(%r14)
subq %r15, %rbx
jne 0x43ec7
movl $0x1, %eax
jmp 0x43f21
movl $0x1, %eax
retq
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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), %rcx
movq 0x20(%rdi), %rax
subq (%rdi), %rcx
movq 0x28(%rdi), %rdx
subq %rax, %rdx
addq %rdx, %rcx
cmpq $0xb, %rcx
movl $0xb, %r12d
cmovbq %rcx, %r12
cmpq %r12, %rdx
jae 0x43f81
movq %rbx, %rdi
callq 0x43e2c
xorl %r15d, %r15d
testl %eax, %eax
je 0x43fbb
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
subq %rax, %rcx
cmpq %r12, %rcx
jb 0x43fbb
movq 0x18(%rbx), %r13
xorl %r15d, %r15d
testq %r13, %r13
je 0x43fbb
addq %rax, %r13
movq %rsp, %rdi
movq %r13, (%rdi)
addq %r13, %r12
movq %r12, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x43342
testl %eax, %eax
je 0x43fbb
movq (%rsp), %rax
subq %r13, %rax
addq %rax, 0x20(%rbx)
movl $0x1, %r15d
movl %r15d, %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/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(%rdi), %rsi
movq 0x28(%rdi), %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 0x4406c
subq %r12, %r13
addq %r12, %r15
movq 0x28(%rbx), %rax
shrq %rax
cmpq %rax, %r13
jae 0x44050
movq %rbx, %rdi
callq 0x43e2c
xorl %ebp, %ebp
testl %eax, %eax
je 0x4406c
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %r14
movq %r14, %rax
subq %rsi, %rax
cmpq %rax, %r13
jbe 0x43fea
jmp 0x4406c
movq (%rbx), %rsi
movq 0x10(%rbx), %rdi
movq %r15, %rdx
movq (%rsp), %rcx
callq *0x10(%rdi)
testl %eax, %eax
je 0x4406a
addq %r13, (%rbx)
jmp 0x4406c
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_O3/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 0x20(%rdi), %rcx
movq 0x28(%rdi), %rax
subq %rcx, %rax
cmpq %rdx, %rax
jae 0x440c0
movq %r15, %rdi
callq 0x43e2c
movq 0x20(%r15), %rcx
testl %eax, %eax
je 0x440b7
movq 0x28(%r15), %rax
subq %rcx, %rax
cmpq %rbx, %rax
jae 0x440c0
addq %rbx, %rcx
movq %rcx, 0x20(%r15)
jmp 0x440f2
movq 0x18(%r15), %rdx
leaq (%rcx,%rbx), %rax
movq %rax, 0x20(%r15)
testq %rdx, %rdx
je 0x440f2
movl $0x1, %eax
testq %rbx, %rbx
je 0x440f4
addq %rcx, %rdx
xorl %ecx, %ecx
movb (%rdx,%rcx), %sil
addb %sil, (%r14,%rcx)
incq %rcx
cmpq %rcx, %rbx
jne 0x440e0
jmp 0x440f4
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x44234
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 0x44232
addq %r15, (%r14)
movq $0x0, 0x18(%r14)
jmp 0x44234
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movl $0x1, %ebx
testq %rdx, %rdx
je 0x442d0
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0x18(%r15), %rbp
movq 0x20(%r15), %r13
cmpq %r13, %r14
setae %al
testq %rbp, %rbp
sete %cl
andb %al, %cl
cmpb $0x1, %cl
je 0x442b4
subq %rbp, %r13
cmpq %r14, %r13
cmovaeq %r14, %r13
movq 0x10(%r15), %rdi
addq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x4290
addq %r13, %rbp
movq %rbp, 0x18(%r15)
cmpq 0x20(%r15), %rbp
jne 0x442aa
movq %r15, %rdi
callq 0x441f9
testl %eax, %eax
je 0x442ce
addq %r13, %r12
subq %r13, %r14
jne 0x4425a
jmp 0x442d0
movq (%r15), %rsi
movq 0x8(%r15), %rdi
leaq (%r12,%r14), %rcx
movq %r12, %rdx
callq *0x18(%rdi)
testl %eax, %eax
je 0x442ce
addq %r14, (%r15)
jmp 0x442d0
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_O3/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 0x44345
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 0x4433c
movq %r15, %rdi
callq 0x441f9
testl %eax, %eax
je 0x44343
subq %r12, %r14
jne 0x44300
jmp 0x44345
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_O3/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 %rsi, (%rsp)
testq %rcx, %rcx
je 0x443c6
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r12
xorl %ebp, %ebp
movq 0x18(%r12), %r15
movq 0x20(%r12), %r13
subq %r15, %r13
movq 0x10(%r12), %rdx
addq %r15, %rdx
cmpq %rbx, %r13
cmovaeq %rbx, %r13
leaq (%rdx,%r13), %rcx
movq (%rsp), %rdi
movq %r14, %rsi
callq *0x10(%rdi)
testl %eax, %eax
je 0x443cb
addq %r13, %r15
movq %r15, 0x18(%r12)
cmpq 0x20(%r12), %r15
jne 0x443be
movq %r12, %rdi
callq 0x441f9
testl %eax, %eax
je 0x443cb
addq %r13, %r14
subq %r13, %rbx
jne 0x44375
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_O3/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, %r14
movq %rsi, %rbx
movq %rdi, %r15
xorl %ebp, %ebp
testq %r14, %r14
je 0x44452
movq 0x20(%rbx), %rcx
movq 0x28(%rbx), %rax
cmpq %r14, %rax
movq %r14, %r12
cmovbq %rax, %r12
subq %rcx, %rax
cmpq %r12, %rax
jae 0x4442a
movq %rbx, %rdi
callq 0x43e2c
movq 0x20(%rbx), %rcx
testl %eax, %eax
je 0x44459
movq 0x28(%rbx), %rax
subq %rcx, %rax
cmpq %r12, %rax
jb 0x44459
movq 0x18(%rbx), %rsi
leaq (%rcx,%r12), %rax
movq %rax, 0x20(%rbx)
testq %rsi, %rsi
je 0x44462
addq %rcx, %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x4423c
subq %r12, %r14
testl %eax, %eax
jne 0x443ef
jmp 0x44462
movl $0x1, %ebp
jmp 0x44462
addq %r12, %rcx
movq %rcx, 0x20(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4484f
movq %rsi, %rdx
testq %rsi, %rsi
je 0x4486e
cmpq $0x0, 0x10(%rdx)
je 0x4488d
movq %rsp, %rsi
callq 0x4462e
addq $0x68, %rsp
retq
leaq 0x1ce1f(%rip), %rdi     # 0x61675
leaq 0x1cb31(%rip), %rsi     # 0x6138e
leaq 0x1ce21(%rip), %rcx     # 0x61685
movl $0x4d2, %edx            # imm = 0x4D2
callq 0x4200
leaq 0x1ce6c(%rip), %rdi     # 0x616e1
leaq 0x1cb12(%rip), %rsi     # 0x6138e
leaq 0x1ce02(%rip), %rcx     # 0x61685
movl $0x4d3, %edx            # imm = 0x4D3
callq 0x4200
leaq 0x1ce5f(%rip), %rdi     # 0x616f3
leaq 0x1caf3(%rip), %rsi     # 0x6138e
leaq 0x1cde3(%rip), %rcx     # 0x61685
movl $0x4d4, %edx            # imm = 0x4D4
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/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 0x44946
addq $0x20, %rsp
cmpl $0x0, (%r15)
je 0x4491e
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 0x45308
// File: /workspace/github_cpp_makefile_star2_O3/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 0x45bd4
movq %rdi, %rbx
cmpq $0x0, (%rdi)
jne 0x45bd4
movq %rsi, %rdx
leaq 0x8(%rbx), %rcx
leaq 0x4008(%rbx), %r8
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x45bf3
testl %eax, %eax
je 0x45bcc
movq (%rsp), %rax
movq %rax, (%rbx)
movl $0x1, %eax
jmp 0x45bce
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
retq
leaq 0x1bb30(%rip), %rdi     # 0x6170b
leaq 0x1b7ac(%rip), %rsi     # 0x6138e
leaq 0x1bb52(%rip), %rcx     # 0x6173b
movl $0x7ae, %edx            # imm = 0x7AE
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/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 0x45e34
movq %rdi, %rbx
cmpq $0x0, (%rdi)
jne 0x45e34
movq %rdx, %rcx
movq %rsi, %rdx
leaq 0x8(%rbx), %r8
leaq 0x4008(%rbx), %r9
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x45e53
testl %eax, %eax
je 0x45e29
movq (%rsp), %rax
movq %rax, (%rbx)
movl $0x1, %eax
jmp 0x45e2b
xorl %eax, %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbx
retq
leaq 0x1b8d0(%rip), %rdi     # 0x6170b
leaq 0x1b54c(%rip), %rsi     # 0x6138e
leaq 0x1b955(%rip), %rcx     # 0x6179e
movl $0x7bf, %edx            # imm = 0x7BF
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/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 %r9, %rax
subq %r8, %rax
xorl %ebx, %ebx
cmpq $0xc0, %rax
jb 0x45f87
movq %r9, %r13
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, (%rsp)
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x4462e
testl %eax, %eax
je 0x45f87
movq 0x20(%rsp), %rcx
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
testq %rcx, %rcx
je 0x45ed3
testq %r12, %r12
je 0x45f87
addq $0x14, %r15
movq %r15, %rdi
movq %rcx, %r15
callq *(%r12)
movq %r15, %rcx
testl %eax, %eax
je 0x45f87
addq $0x7, %r14
andq $-0x8, %r14
leaq 0xb8(%r14), %rax
movq 0x10(%rsp), %rsi
leaq 0x58(%r14), %rdi
leaq 0x15cd(%rip), %rdx      # 0x474bf
movq %rdx, (%r14)
leaq 0x15c8(%rip), %rdx      # 0x474c4
movq %rdx, 0x8(%r14)
leaq 0x16ca(%rip), %rdx      # 0x475d1
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 0x16ed(%rip), %rdx      # 0x4761f
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 0x10(%rsp), %r9
movq %rbp, %r8
pushq %r13
pushq %rax
pushq %r12
callq 0x440fa
addq $0x20, %rsp
testl %eax, %eax
je 0x45f87
movq (%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_O3/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 0x46111
movq %rdi, %rbx
cmpq $0x0, 0x28(%rdi)
jne 0x46130
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 0x46109
movq %r15, 0x20(%rbx)
movq %rbx, (%rbx)
movq %r14, 0x8(%rbx)
leaq 0x7a3(%rip), %rax       # 0x468a1
movq %rax, 0x10(%rbx)
movl $0x1, %eax
jmp 0x4610b
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x17d1e(%rip), %rdi     # 0x5de36
leaq 0x1b26f(%rip), %rsi     # 0x6138e
leaq 0x1b6f1(%rip), %rcx     # 0x61817
movl $0x81d, %edx            # imm = 0x81D
callq 0x4200
leaq 0x1b797(%rip), %rdi     # 0x618ce
leaq 0x1b250(%rip), %rsi     # 0x6138e
leaq 0x1b6d2(%rip), %rcx     # 0x61817
movl $0x81e, %edx            # imm = 0x81E
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/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 0x46720
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rsi
testq %rsi, %rsi
je 0x4671f
movq 0x20(%rbx), %rdi
callq *0x10(%rdi)
movq $0x0, 0x28(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movdqu 0x20(%rdi), %xmm0
movq 0x30(%rdi), %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
paddq %xmm0, %xmm1
movdqu %xmm1, 0x10(%rdi)
movl $0x1, %ecx
callq 0x43342
testl %eax, %eax
je 0x46941
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 0x43342
testl %eax, %eax
je 0x46941
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 0x43342
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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        # 0x4697e
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_O3/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 0x46cf5
cmpl $0x0, 0x38(%rdi)
movq 0x20(%rdi), %rax
movq %rcx, %rdx
je 0x46cd5
shlq $0x4, %rdx
movsd (%rax,%rdx), %xmm0
xorps %xmm1, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movl 0x8(%rax,%rdx), %eax
jmp 0x46ce2
shlq $0x5, %rdx
movups (%rax,%rdx), %xmm0
movq 0x10(%rax,%rdx), %rax
movups %xmm0, (%rsi)
movq %rax, 0x10(%rsi)
incq %rcx
movq %rcx, 0x30(%rdi)
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: cache_old_StreamInput_read
static hpatch_BOOL _cache_old_StreamInput_read(const hpatch_TStreamInput* stream,
                                               hpatch_StreamPos_t readFromPos,
                                               unsigned char* out_data,unsigned char* out_data_end){
    _cache_old_TStreamInput* self=(_cache_old_TStreamInput*)stream->streamImport;
    hpatch_StreamPos_t dataLen=(hpatch_size_t)(self->readFromPosEnd-self->readFromPos);
    hpatch_size_t readLen;
    if (dataLen==0){//next cover
        hpatch_StreamPos_t oldPos;
        hpatch_size_t i=self->arrayCovers.cur_index++;
        if (i>=self->arrayCovers.coverCount) return _hpatch_FALSE;//error;
        oldPos=_arrayCovers_get_oldPos(&self->arrayCovers,i);
        dataLen=_arrayCovers_get_len(&self->arrayCovers,i);
        self->isInHitCache=(dataLen<=self->maxCachedLen);
        self->readFromPos=oldPos;
        self->readFromPosEnd=oldPos+dataLen;
    }
    readLen=out_data_end-out_data;
    if ((readLen>dataLen)||(self->readFromPos!=readFromPos)) return _hpatch_FALSE; //error
    self->readFromPos=readFromPos+readLen;
    if (self->isInHitCache){
        assert(readLen<=(hpatch_size_t)(self->cachesEnd-self->caches));
        memcpy(out_data,self->caches,readLen);
        self->caches+=readLen;
        return hpatch_TRUE;
    }else{
        return self->oldData->read(self->oldData,readFromPos,out_data,out_data_end);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %r14
movq 0x50(%r14), %rdi
movq 0x58(%r14), %r8
subq %rdi, %r8
jne 0x46d62
movq 0x30(%r14), %r8
leaq 0x1(%r8), %rax
movq %rax, 0x30(%r14)
xorl %eax, %eax
cmpq 0x28(%r14), %r8
jae 0x46da7
cmpl $0x0, 0x38(%r14)
movq 0x20(%r14), %rax
je 0x46d3c
shlq $0x4, %r8
movl (%rax,%r8), %edi
movl 0x8(%rax,%r8), %r8d
jmp 0x46d49
shlq $0x5, %r8
movq (%rax,%r8), %rdi
movq 0x10(%rax,%r8), %r8
xorl %eax, %eax
cmpq 0x48(%r14), %r8
setbe %al
movl %eax, 0x40(%r14)
movq %rdi, 0x50(%r14)
leaq (%r8,%rdi), %rax
movq %rax, 0x58(%r14)
movq %rcx, %rbx
subq %rdx, %rbx
xorl %eax, %eax
cmpq %r8, %rbx
ja 0x46da7
cmpq %rsi, %rdi
jne 0x46da7
leaq (%rbx,%rsi), %rax
movq %rax, 0x50(%r14)
cmpl $0x0, 0x40(%r14)
je 0x46daf
movq 0x60(%r14), %rsi
movq 0x68(%r14), %rax
subq %rsi, %rax
cmpq %rax, %rbx
ja 0x46dc0
movq %rdx, %rdi
movq %rbx, %rdx
callq 0x4290
addq %rbx, 0x60(%r14)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x70(%r14), %rdi
movq 0x10(%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x1b097(%rip), %rdi     # 0x61e5e
leaq 0x1a5c0(%rip), %rsi     # 0x6138e
leaq 0x1b0c0(%rip), %rcx     # 0x61e95
movl $0x6cc, %edx            # imm = 0x6CC
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: covers_read_cover
static  hpatch_BOOL _covers_read_cover(hpatch_TCovers* covers,hpatch_TCover* out_cover){
    _TCovers* self=(_TCovers*)covers;
    hpatch_StreamPos_t oldPosBack=self->oldPosBack;
    hpatch_StreamPos_t newPosBack=self->newPosBack;
    hpatch_StreamPos_t coverCount=self->coverCount;
    if (coverCount>0)
        self->coverCount=coverCount-1;
    else
        return _hpatch_FALSE;
    
    {
        hpatch_StreamPos_t copyLength,coverLength, oldPos,inc_oldPos;
        TByte inc_oldPos_sign;
        const TByte* pSign=_TStreamCacheClip_accessData(self->code_inc_oldPosClip,1);
        if (pSign)
            inc_oldPos_sign=(*pSign)>>(8-kSignTagBit);
        else
            return _hpatch_FALSE;
        _clip_unpackUIntWithTagTo(&inc_oldPos,self->code_inc_oldPosClip,kSignTagBit);
        oldPos=(inc_oldPos_sign==0)?(oldPosBack+inc_oldPos):(oldPosBack-inc_oldPos);
        _clip_unpackUIntTo(&copyLength,self->code_inc_newPosClip);
        _clip_unpackUIntTo(&coverLength,self->code_lengthsClip);
        newPosBack+=copyLength;
        oldPosBack=oldPos;
        oldPosBack+=(self->isOldPosBackNeedAddLength)?coverLength:0;
        
        out_cover->oldPos=oldPos;
        out_cover->newPos=newPosBack;
        out_cover->length=coverLength;
        newPosBack+=coverLength;
    }
    self->oldPosBack=oldPosBack;
    self->newPosBack=newPosBack;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x20(%rdi), %rax
xorl %ebp, %ebp
testq %rax, %rax
je 0x475c0
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rdi), %rcx
movq %rcx, 0x8(%rsp)
movq 0x30(%rdi), %r12
decq %rax
movq %rax, 0x20(%rdi)
movq 0x38(%rdi), %r15
movq 0x20(%r15), %rax
cmpq %rax, 0x28(%r15)
jne 0x47527
movq %r15, %rdi
callq 0x43e2c
testl %eax, %eax
je 0x475c0
movq 0x20(%r15), %rax
cmpq %rax, 0x28(%r15)
je 0x475c0
movq 0x18(%r15), %rcx
testq %rcx, %rcx
je 0x475c0
movb (%rcx,%rax), %r13b
movq 0x38(%rbx), %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x43f27
testl %eax, %eax
je 0x475c0
movq 0x10(%rsp), %rax
movq %rax, %r15
negq %r15
testb %r13b, %r13b
cmovnsq %rax, %r15
movq 0x40(%rbx), %rdi
leaq 0x20(%rsp), %rsi
xorl %edx, %edx
callq 0x43f27
testl %eax, %eax
je 0x475c0
movq 0x48(%rbx), %rdi
leaq 0x18(%rsp), %rsi
xorl %edx, %edx
callq 0x43f27
testl %eax, %eax
je 0x475c0
addq 0x20(%rsp), %r12
addq 0x8(%rsp), %r15
xorl %eax, %eax
cmpl $0x0, 0x50(%rbx)
movq 0x18(%rsp), %rcx
cmovneq %rcx, %rax
addq %r15, %rax
movq %r15, (%r14)
movq %r12, 0x8(%r14)
movq %rcx, 0x10(%r14)
addq %rcx, %r12
movq %rax, 0x28(%rbx)
movq %r12, 0x30(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x28, %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/HPatch/patch.c
// Function: covers_is_finish
static  hpatch_BOOL _covers_is_finish(const struct hpatch_TCovers* covers){
    _TCovers* self=(_TCovers*)covers;
    return _TStreamCacheClip_isFinish(self->code_lengthsClip)
        && _TStreamCacheClip_isFinish(self->code_inc_newPosClip)
        && _TStreamCacheClip_isFinish(self->code_inc_oldPosClip);
}

// Assembly:
movq 0x48(%rdi), %rax
movq 0x8(%rax), %rcx
movq 0x20(%rax), %rdx
subq (%rax), %rcx
subq 0x28(%rax), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
jne 0x4761e
movq 0x40(%rdi), %rcx
movq 0x8(%rcx), %rdx
subq (%rcx), %rdx
movq 0x20(%rcx), %rsi
subq 0x28(%rcx), %rsi
cmpq %rsi, %rdx
jne 0x4761e
movq 0x38(%rdi), %rax
movq 0x8(%rax), %rcx
movq 0x20(%rax), %rdx
subq (%rax), %rcx
subq 0x28(%rax), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
sete %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HPatch/patch.c
// Function: compressedCovers_close
static hpatch_BOOL _compressedCovers_close(hpatch_TCovers* covers){
    hpatch_BOOL result=hpatch_TRUE;
    _TCompressedCovers* self=(_TCompressedCovers*)covers;
    if (self){
        if (self->decompresser.decompressHandle){
            result=self->decompresser.decompressPlugin->close(self->decompresser.decompressPlugin,
                                                              self->decompresser.decompressHandle);
            self->decompresser.decompressHandle=0;
        }
    }
    return result;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x4764b
movq %rdi, %rbx
movq 0xb0(%rdi), %rsi
testq %rsi, %rsi
je 0x4764b
movq 0xa8(%rbx), %rdi
callq *0x10(%rdi)
movq $0x0, 0xb0(%rbx)
jmp 0x47650
movl $0x1, %eax
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: hpatch_getTempPathName
hpatch_BOOL hpatch_getTempPathName(const char* path_utf8,char* out_tempPath_utf8,char* out_tempPath_end){
    //use tmpnam()?
#define _AddingLen 8
    size_t i;
    size_t len=strlen(path_utf8);
    if ((len>0)&&(path_utf8[len-1]==kPatch_dirSeparator)) --len; //without '/'
    if (len+(4+_AddingLen)>(size_t)(out_tempPath_end-out_tempPath_utf8)) { _set_errno_new(ENAMETOOLONG); return hpatch_FALSE; }
    memcpy(out_tempPath_utf8,path_utf8,len);
    out_tempPath_utf8+=len;
    for (i=1; i<1000; ++i) {
        hpatch_TPathType tmpPathType;
        char adding[_AddingLen]={'0','0','0','.','t','m','p','\0'};
        adding[2]+=i%10;    adding[1]+=(i/10)%10;   adding[0]+=(i/100)%10;
        memcpy(out_tempPath_utf8,adding,sizeof(adding));
        if (!_hpatch_getPathStat_noEndDirSeparator(out_tempPath_utf8,&tmpPathType,0,0)) return hpatch_FALSE;
        if (tmpPathType==kPathType_notExist)
            return hpatch_TRUE; //ok
    }
    return hpatch_FALSE;
#undef _AddingLen
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4140
testq %rax, %rax
je 0x47823
movq %rax, %r15
xorl %eax, %eax
cmpb $0x2f, -0x1(%rbx,%r15)
sete %al
subq %rax, %r15
jmp 0x47826
xorl %r15d, %r15d
leaq 0xc(%r15), %rax
subq %r14, %r12
cmpq %r12, %rax
jbe 0x47842
callq 0x4050
movl $0x24, (%rax)
jmp 0x478fd
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x4290
leaq (%r14,%r15), %rbx
addq %r14, %r15
addq $0x3, %r15
movw $0x1, %bp
xorl %r12d, %r12d
leaq 0xc(%rsp), %r14
movzwl %bp, %eax
imull $0xcccd, %eax, %eax     # imm = 0xCCCD
shrl $0x12, %eax
andl $-0x2, %eax
leal (%rax,%rax,4), %eax
movb $0x30, %cl
subb %al, %cl
movzbl %cl, %eax
leal 0x1(%r12), %ecx
addl %r12d, %eax
movzwl %cx, %ecx
imull $0xcccd, %ecx, %edx     # imm = 0xCCCD
shrl $0x13, %edx
movzbl %dl, %edx
imull $0xcd, %edx, %esi
shrl $0xa, %esi
andl $-0x2, %esi
leal (%rsi,%rsi,4), %esi
subb %sil, %dl
orb $0x30, %dl
shrl $0x2, %ecx
imull $0x147b, %ecx, %ecx     # imm = 0x147B
shrl $0x11, %ecx
orb $0x30, %cl
movb %cl, (%rbx)
movb %dl, 0x1(%rbx)
incb %al
movb %al, 0x2(%rbx)
movb $0x0, 0x4(%r15)
movl $0x706d742e, (%r15)     # imm = 0x706D742E
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x47665
testl %eax, %eax
je 0x478fd
cmpl $0x0, 0xc(%rsp)
je 0x4790c
incq %r12
incl %ebp
cmpq $0x3e7, %r12            # imm = 0x3E7
jne 0x47867
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x478ff
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: hpatch_renamePath
hpatch_BOOL hpatch_renamePath(const char* oldPath_utf8,const char* newPath_utf8){
    _path_noEndDirSeparator(oldPath,oldPath_utf8); {
        _path_noEndDirSeparator(newPath,newPath_utf8); {
#if (_IS_USED_WIN32_UTF8_WAPI)
            int     wsize;
            wchar_t oldPath_w[hpatch_kPathMaxSize];
            wchar_t newPath_w[hpatch_kPathMaxSize];
            wsize=_utf8FileName_to_w(oldPath,oldPath_w,hpatch_kPathMaxSize);
            if (wsize<=0) return hpatch_FALSE;
            wsize=_utf8FileName_to_w(newPath,newPath_w,hpatch_kPathMaxSize);
            if (wsize<=0) return hpatch_FALSE;
            return 0==_wrename(oldPath_w,newPath_w);
#else
            return 0==rename(oldPath,newPath);
#endif
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x2000, %rsp           # imm = 0x2000
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4140
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x47988
movq %rax, %r15
testq %rax, %rax
je 0x4794a
xorl %eax, %eax
cmpb $0x2f, -0x1(%r14,%r15)
sete %al
subq %rax, %r15
jmp 0x4794d
xorl %r15d, %r15d
movq %rsp, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4290
movb $0x0, (%rsp,%r15)
movq %rbx, %rdi
callq 0x4140
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x47988
movq %rax, %r14
testq %rax, %rax
je 0x47997
xorl %eax, %eax
cmpb $0x2f, -0x1(%rbx,%r14)
sete %al
subq %rax, %r14
jmp 0x4799a
callq 0x4050
movl $0x24, (%rax)
xorl %eax, %eax
jmp 0x479cd
xorl %r14d, %r14d
leaq 0x1000(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4290
movb $0x0, 0x1000(%rsp,%r14)
movq %rsp, %rdi
movq %r15, %rsi
callq 0x41f0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
addq $0x2000, %rsp           # imm = 0x2000
popq %rbx
popq %r14
popq %r15
retq