// File: sisong[P]ApkDiffPatch/src/../HDiffPatch/decompress_plugin_demo.h
// Function: _zlib_do_inflate(void*)
static hpatch_BOOL __zlib_do_inflate(hpatch_decompressHandle decompressHandle){
        _zlib_TDecompress* self=(_zlib_TDecompress*)decompressHandle;
        uInt avail_out_back,avail_in_back;
        int ret;
        hpatch_StreamPos_t codeLen=(self->code_end - self->code_begin);
        if ((self->d_stream.avail_in==0)&&(codeLen>0)) {
            size_t readLen=self->dec_buf_size;
            if (readLen>codeLen) readLen=(size_t)codeLen;
            self->d_stream.next_in=self->dec_buf;
            if (!self->codeStream->read(self->codeStream,self->code_begin,self->dec_buf,
                                        self->dec_buf+readLen)) return hpatch_FALSE;//error;
            self->d_stream.avail_in=(uInt)readLen;
            self->code_begin+=readLen;
            codeLen-=readLen;
        }
        
        avail_out_back=self->d_stream.avail_out;
        avail_in_back=self->d_stream.avail_in;
        ret=inflate(&self->d_stream,Z_NO_FLUSH);
        if (ret==Z_OK){
            if ((self->d_stream.avail_in==avail_in_back)&&(self->d_stream.avail_out==avail_out_back))
                _dec_onDecErr_rt();//error;
        }else if (ret==Z_STREAM_END){
            if (self->d_stream.avail_in+codeLen>0){ //next compress node!
                if (!_zlib_reset_for_next_node(&self->d_stream))
                    _dec_onDecErr_rt();//error;
            }else{//all end
                if (self->d_stream.avail_out!=0)
                    _dec_onDecErr_rt();//error;
            }
        }else{
            _dec_onDecErr_rt();//error;
        }
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
subq (%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x765a
cmpq $0x0, -0x30(%rbp)
jbe 0x765a
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jbe 0x75de
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rdi
movq -0x18(%rbp), %rcx
movq (%rcx), %rsi
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rdx
movq -0x18(%rbp), %rcx
movq 0x18(%rcx), %rcx
addq -0x38(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x7630
movl $0x0, -0x4(%rbp)
jmp 0x7780
movq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x38(%rbp), %rcx
movq -0x18(%rbp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
addq $0x28, %rdi
xorl %esi, %esi
callq 0x9b200
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x76cc
movq -0x18(%rbp), %rax
movl 0x30(%rax), %eax
cmpl -0x20(%rbp), %eax
jne 0x76c7
movq -0x18(%rbp), %rax
movl 0x48(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x76c7
jmp 0x76a0
movq -0x18(%rbp), %rax
cmpl $0x0, 0x9c(%rax)
jne 0x76bb
movq -0x18(%rbp), %rax
movl $0x3, 0x9c(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x7780
jmp 0x7779
cmpl $0x1, -0x24(%rbp)
jne 0x7751
movq -0x18(%rbp), %rax
movl 0x30(%rax), %eax
addq -0x30(%rbp), %rax
cmpq $0x0, %rax
jbe 0x771d
movq -0x18(%rbp), %rdi
addq $0x28, %rdi
callq 0x7790
cmpl $0x0, %eax
jne 0x771b
jmp 0x76f7
movq -0x18(%rbp), %rax
cmpl $0x0, 0x9c(%rax)
jne 0x7712
movq -0x18(%rbp), %rax
movl $0x3, 0x9c(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x7780
jmp 0x774f
movq -0x18(%rbp), %rax
cmpl $0x0, 0x48(%rax)
je 0x774d
jmp 0x7729
movq -0x18(%rbp), %rax
cmpl $0x0, 0x9c(%rax)
jne 0x7744
movq -0x18(%rbp), %rax
movl $0x3, 0x9c(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x7780
jmp 0x774f
jmp 0x7777
jmp 0x7753
movq -0x18(%rbp), %rax
cmpl $0x0, 0x9c(%rax)
jne 0x776e
movq -0x18(%rbp), %rax
movl $0x3, 0x9c(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x7780
jmp 0x7779
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)