// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/src/patch/Zipper.cpp
// Function: UnZipper_compressedData_decompressTo
bool UnZipper_compressedData_decompressTo(UnZipper* self,const hpatch_TStreamInput* codeStream,
                                          hpatch_StreamPos_t code_begin,hpatch_StreamPos_t code_end,
                                          hpatch_StreamPos_t uncompressedSize,
                                          const hpatch_TStreamOutput* outStream,hpatch_StreamPos_t writeToPos){
    bool result=true;
    _zlib_TDecompress* decHandle=_zlib_decompress_open_by(decompressPlugin,codeStream,code_begin,
                                                          code_end,0,self->_buf,(kBufSize>>1));
    TByte* dataBuf=self->_buf+(kBufSize>>1);
    hpatch_StreamPos_t  curWritePos=0;
    check_clear(decHandle!=0);
    while (curWritePos<uncompressedSize){
        hpatch_StreamPos_t readLen=(kBufSize>>1);
        if (readLen>(uncompressedSize-curWritePos)) readLen=uncompressedSize-curWritePos;
        check_clear(_zlib_decompress_part(decHandle,dataBuf,dataBuf+readLen));
        check_clear(outStream->write(outStream,writeToPos+curWritePos,dataBuf,dataBuf+readLen));
        curWritePos+=readLen;
    }
    if (!_zlib_is_decompress_finish(decompressPlugin,decHandle))
        printf("WARNING: zip format error, decompress not finish!\n");
clear:
    _zlib_decompress_close_by(decompressPlugin,decHandle);
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %r14
movq %r8, 0x10(%rsp)
movq 0x90(%rdi), %r9
leaq 0x2000(%r9), %rax
addq $0x7, %r9
andq $-0x8, %r9
subq %r9, %rax
jbe 0x37e4e
movq %rdi, %r12
movq %rax, (%rsp)
leaq 0x3d7f2(%rip), %rdi     # 0x75528
xorl %r8d, %r8d
callq 0x39d0a
testq %rax, %rax
je 0x37e4e
movq %rax, %rbx
movl $0x2000, %eax           # imm = 0x2000
movq 0x90(%r12), %r12
addq %rax, %r12
xorl %r15d, %r15d
movq 0x10(%rsp), %rbp
subq %r15, %rbp
jbe 0x37dc9
movl $0x2000, %eax           # imm = 0x2000
cmpq %rax, %rbp
cmovaeq %rax, %rbp
leaq (%r12,%rbp), %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x37e6d
testl %eax, %eax
je 0x37e2f
movq 0x50(%rsp), %rax
leaq (%r15,%rax), %rsi
movq %r14, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq *0x18(%r14)
addq %rbp, %r15
testl %eax, %eax
jne 0x37d5d
leaq 0x1729f(%rip), %rdi     # 0x4f050
leaq 0x1d5c9(%rip), %rsi     # 0x55381
leaq 0x1d796(%rip), %rcx     # 0x55555
movl $0x290, %edx            # imm = 0x290
callq 0x4230
leaq 0xf(%rsp), %r14
movb $0x0, (%r14)
movq (%rbx), %rax
cmpq 0x8(%rbx), %rax
je 0x37df6
movq %r14, 0x40(%rbx)
andl $0x0, 0x48(%rbx)
movq %rbx, %rdi
callq 0x39f90
testl %eax, %eax
jne 0x37dd2
andq $0x0, 0x40(%rbx)
jmp 0x37e03
andq $0x0, 0x40(%rbx)
movl 0x48(%rbx), %eax
orl 0x30(%rbx), %eax
je 0x37e0f
leaq 0x1e5c5(%rip), %rdi     # 0x563cf
callq 0x4510
leaq 0x3d712(%rip), %rdi     # 0x75528
movq %rbx, %rsi
callq 0x37ec3
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1721a(%rip), %rdi     # 0x4f050
leaq 0x1d544(%rip), %rsi     # 0x55381
leaq 0x1d711(%rip), %rcx     # 0x55555
movl $0x28f, %edx            # imm = 0x28F
callq 0x4230
leaq 0x171fb(%rip), %rdi     # 0x4f050
leaq 0x1d525(%rip), %rsi     # 0x55381
leaq 0x1d6f2(%rip), %rcx     # 0x55555
movl $0x28b, %edx            # imm = 0x28B
callq 0x4230