// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/src/patch/../../HDiffPatch/compress_plugin_demo.h
// Function: zlib_compress_part(_zlib_TCompress*, unsigned char const*, unsigned char const*, int, unsigned long long*, int*)
static int _zlib_compress_part(_zlib_TCompress* self,
                                   const unsigned char* part_data,const unsigned char* part_data_end,
                                   int is_data_end,hpatch_StreamPos_t* curWritedPos,int* outStream_isCanceled){
        int                 result=1; //true
        const char*         errAt="";
        int                 is_stream_end=0;
        int                 is_eof=0;
        assert(part_data<=part_data_end);
        self->c_stream.next_in=(Bytef*)part_data;
        self->c_stream.avail_in=(uInt)(part_data_end-part_data);
        while (1) {
            if ((self->c_stream.avail_out<self->c_buf_size)|is_stream_end){
                size_t writeLen=self->c_buf_size-self->c_stream.avail_out;
                if (writeLen>0){
                    _stream_out_code_write(self->out_code,*outStream_isCanceled,
                                           (*curWritedPos),self->c_buf,writeLen);
                }
                self->c_stream.next_out=(Bytef*)self->c_buf;
                self->c_stream.avail_out=(uInt)self->c_buf_size;
                if (is_stream_end)
                    break;//end loop
            }else{
                if (self->c_stream.avail_in>0){
                    if (Z_OK!=deflate(&self->c_stream,Z_NO_FLUSH)) _compress_error_return("deflate()");
                }else if (is_eof){
                    int ret=deflate(&self->c_stream,Z_FINISH);
                    is_stream_end= (ret==Z_STREAM_END);
                    if ((ret!=Z_STREAM_END)&&(ret!=Z_OK))
                        _compress_error_return("deflate() Z_FINISH");
                }else{
                    if (!is_data_end)
                        break;//part ok
                    else
                        is_eof=1;
                }
            }
        }
    clear:
        _check_compress_result(result,*outStream_isCanceled,"_zlib_compress_part()",errAt);
        return result;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
cmpq %rdx, %rsi
ja 0x41a11
movq %r8, %r14
movq %rdi, %r13
leaq 0x18(%rdi), %rbx
movq %rsi, 0x18(%rdi)
subl %esi, %edx
movl %edx, 0x20(%rdi)
movl $0x1, 0xc(%rsp)
xorl %r15d, %r15d
leaq 0x193d8(%rip), %rax     # 0x5ac79
movq %rax, 0x10(%rsp)
xorl %r12d, %r12d
testl %r15d, %r15d
sete 0xb(%rsp)
movl 0x38(%r13), %eax
movq 0x10(%r13), %rbp
xorl %ecx, %ecx
cmpq %rax, %rbp
seta %cl
orl %r15d, %ecx
jne 0x418e0
cmpl $0x0, 0x20(%r13)
je 0x4191b
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4b75d
testl %eax, %eax
je 0x418b1
jmp 0x419ad
subq %rax, %rbp
je 0x418fe
movq (%r14), %rsi
movq (%r13), %rdi
movq 0x8(%r13), %rdx
leaq (%rdx,%rbp), %rcx
callq *0x18(%rdi)
testl %eax, %eax
je 0x41932
addq %rbp, (%r14)
movq 0x8(%r13), %rax
movq %rax, 0x30(%r13)
movl 0x10(%r13), %eax
movl %eax, 0x38(%r13)
movb 0xb(%rsp), %al
testb %al, %al
jne 0x418b1
jmp 0x419cd
testl %r12d, %r12d
jne 0x41961
movl $0x1, %r12d
cmpl $0x0, 0x1c(%rsp)
jne 0x418b1
jmp 0x419cd
movq 0x20(%rsp), %rax
movl $0x1, (%rax)
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
leaq 0x177f5(%rip), %rcx     # 0x59141
cmoveq %rcx, %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
xorl %eax, %eax
jmp 0x41912
movq %rbx, %rdi
movl $0x4, %esi
callq 0x4b75d
xorl %r15d, %r15d
cmpl $0x1, %eax
sete %cl
jbe 0x41999
movq 0x10(%rsp), %rdx
cmpb $0x0, (%rdx)
leaq 0x1791b(%rip), %rsi     # 0x592a3
cmoveq %rsi, %rdx
movq %rdx, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movb %cl, %r15b
movl $0x1, %r12d
cmpl $0x2, %eax
jb 0x418a9
jmp 0x419cd
movq 0x10(%rsp), %rcx
cmpb $0x0, (%rcx)
leaq 0x178dd(%rip), %rax     # 0x59299
cmoveq %rax, %rcx
movq %rcx, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %ebx
testl %ebx, %ebx
jne 0x41a00
movq 0x20(%rsp), %rax
cmpl $0x0, (%rax)
je 0x419ed
leaq 0x1861e(%rip), %rdi     # 0x5a004
callq 0x44e0
jmp 0x41a00
leaq 0x178c2(%rip), %rdi     # 0x592b6
movq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x4060
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f5db(%rip), %rdi     # 0x60ff3
leaq 0x1f5a2(%rip), %rsi     # 0x60fc1
leaq 0x1f5e6(%rip), %rcx     # 0x6100c
movl $0xb8, %edx
callq 0x4200