// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/../HDiffPatch/decompress_plugin_demo.h
// Function: lzma_decompress_part(void*, unsigned char*, unsigned char*)
static hpatch_BOOL _lzma_decompress_part(hpatch_decompressHandle decompressHandle,
                                             unsigned char* out_part_data,unsigned char* out_part_data_end){
        _lzma_TDecompress* self=(_lzma_TDecompress*)decompressHandle;
        unsigned char* out_cur=out_part_data;
        assert(out_part_data<=out_part_data_end);
        while (out_cur<out_part_data_end){
            size_t copyLen=(self->decEnv.dicPos-self->decCopyPos);
            if (copyLen>0){
                if (copyLen>(size_t)(out_part_data_end-out_cur))
                    copyLen=(out_part_data_end-out_cur);
                memcpy(out_cur,self->decEnv.dic+self->decCopyPos,copyLen);
                out_cur+=copyLen;
                self->decCopyPos+=copyLen;
                if ((self->decEnv.dicPos==self->decEnv.dicBufSize)
                    &&(self->decEnv.dicPos==self->decCopyPos)){
                    self->decEnv.dicPos=0;
                    self->decCopyPos=0;
                }
            }else{
                ELzmaStatus status;
                SizeT inSize,dicPos_back;
                SRes res;
                hpatch_StreamPos_t codeLen=(self->code_end - self->code_begin);
                if ((self->decReadPos==kDecompressBufSize)&&(codeLen>0)) {
                    size_t readLen=kDecompressBufSize;
                    if (readLen>codeLen) readLen=(size_t)codeLen;
                    self->decReadPos=kDecompressBufSize-readLen;
                    if (!self->codeStream->read(self->codeStream,self->code_begin,self->dec_buf+self->decReadPos,
                                                self->dec_buf+self->decReadPos+readLen)) return hpatch_FALSE;//error;
                    self->code_begin+=readLen;
                }

                inSize=kDecompressBufSize-self->decReadPos;
                dicPos_back=self->decEnv.dicPos;
                res=LzmaDec_DecodeToDic(&self->decEnv,self->decEnv.dicBufSize,
                                        self->dec_buf+self->decReadPos,&inSize,LZMA_FINISH_ANY,&status);
                if(res==SZ_OK){
                    if ((inSize==0)&&(self->decEnv.dicPos==dicPos_back))
                        _dec_onDecErr_rt();//error;
                }else{
                    _dec_onDecErr_rt();//error;
                }
                self->decReadPos+=inSize;
            }
        }
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpq %rdx, %rsi
ja 0x732c
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x28(%rdi), %r12
leaq 0xbc(%rdi), %r13
leaq 0x80bc(%rdi), %rax
movq %rax, 0x18(%rsp)
leaq 0xb8(%rdi), %rax
movq %rax, 0x8(%rsp)
cmpq %rbp, %r14
jae 0x7318
movq 0x50(%r15), %rax
movq 0xa8(%r15), %rsi
subq %rsi, %rax
jne 0x72a6
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rbx
cmpq $0x8000, 0xb0(%r15) # imm = 0x8000
sete %al
subq %rsi, %rbx
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x7255
movl $0x8000, %eax           # imm = 0x8000
cmpq %rax, %rbx
cmovaeq %rax, %rbx
movl $0x8000, %edx           # imm = 0x8000
subq %rbx, %rdx
movq %rdx, 0xb0(%r15)
movq 0x10(%r15), %rdi
addq %r13, %rdx
movq 0x18(%rsp), %rcx
callq *0x10(%rdi)
testl %eax, %eax
je 0x72a2
addq %rbx, 0x18(%r15)
movq 0xb0(%r15), %rdx
movl $0x8000, %eax           # imm = 0x8000
subq %rdx, %rax
movq %rax, 0x10(%rsp)
movq 0x48(%r15), %rsi
movq 0x50(%r15), %rbx
addq %r13, %rdx
movq %r12, %rdi
leaq 0x10(%rsp), %rcx
xorl %r8d, %r8d
leaq 0x24(%rsp), %r9
callq 0x55226
testl %eax, %eax
je 0x72f3
movq 0x8(%rsp), %rax
cmpl $0x0, (%rax)
jne 0x72a2
movq 0x8(%rsp), %rax
movl $0x3, (%rax)
xorl %eax, %eax
jmp 0x730c
movq %rbp, %rbx
subq %r14, %rbx
cmpq %rbx, %rax
cmovbq %rax, %rbx
addq 0x40(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x4290
addq %rbx, %r14
addq 0xa8(%r15), %rbx
movq %rbx, 0xa8(%r15)
movq 0x50(%r15), %rcx
movb $0x1, %al
cmpq 0x48(%r15), %rcx
jne 0x730c
cmpq %rbx, %rcx
jne 0x730c
xorl %ecx, %ecx
movq %rcx, 0x50(%r15)
movq %rcx, 0xa8(%r15)
jmp 0x730c
movq 0x10(%rsp), %rax
testq %rax, %rax
jne 0x7303
cmpq %rbx, 0x50(%r15)
je 0x728d
addq %rax, 0xb0(%r15)
movb $0x1, %al
testb %al, %al
jne 0x71e3
xorl %eax, %eax
jmp 0x731d
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x52054(%rip), %rdi     # 0x59387
leaq 0x51ff2(%rip), %rsi     # 0x5932c
leaq 0x522c2(%rip), %rcx     # 0x59603
movl $0x312, %edx            # imm = 0x312
callq 0x4200