LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: hpatch_TFileStreamOutput_read_file
static hpatch_BOOL _hpatch_TFileStreamOutput_read_file(const hpatch_TStreamOutput* stream,
                                                           hpatch_StreamPos_t readFromPos,
                                                           TByte* out_data,TByte* out_data_end){
         //hpatch_TFileStreamOutput is A hpatch_TFileStreamInput !
        hpatch_TFileStreamOutput* self=(hpatch_TFileStreamOutput*)stream->streamImport;
        const hpatch_TStreamInput* in_stream=(const hpatch_TStreamInput*)stream;
        if (!self->is_in_readModel){
            if (!hpatch_TFileStreamOutput_flush(self)) _rw_ferr_return();
            self->is_in_readModel=hpatch_TRUE;
            self->m_fpos=hpatch_kNullStreamPos;
        }
        return _TFileStreamInput_read_file(in_stream,readFromPos,out_data,out_data_end);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq (%rdi), %rbx
cmpl $0x0, 0x40(%rbx)
jne 0x3edda
movq %rbx, %rdi
callq 0x3f1fd
testl %eax, %eax
je 0x3edf9
movl $0x1, 0x40(%rbx)
orq $-0x1, 0x28(%rbx)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3ea8e
orq $-0x1, 0x28(%rbx)
callq 0x4050
movl (%rax), %ebp
movl 0x38(%rbx), %eax
cmpl %ebp, %eax
sete %cl
testl %ebp, %ebp
sete %dl
orb %cl, %dl
je 0x3ee27
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %eax, %eax
jne 0x3ee2e
movl %ebp, 0x38(%rbx)
movq 0x36193(%rip), %rax     # 0x74fc8
movq (%rax), %rbx
movl %ebp, %edi
callq 0x40e0
leaq 0xf4b0(%rip), %rsi      # 0x4e2f6
movq %rbx, %rdi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4480
jmp 0x3ee16
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: hpatch_TFileStreamOutput_reopen
hpatch_BOOL hpatch_TFileStreamOutput_reopen(hpatch_TFileStreamOutput* self,const char* fileName_utf8,
                                            hpatch_StreamPos_t max_file_length){
    hpatch_StreamPos_t curFileWritePos=0;
    assert(self->m_file==0);
    self->fileError=hpatch_FALSE;
    if (self->m_file) _ferr_returnv(EINVAL);
    if (!_import_fileReopenWrite(fileName_utf8,&self->m_file,&curFileWritePos))
       _ferr_return();
    if (curFileWritePos>max_file_length){
        //note: now not support reset file length to max_file_length
        _import_fileClose(&self->m_file);
        _ferr_returnv(EFBIG);
    }
    self->base.streamImport=self;
    self->base.streamSize=max_file_length;
    self->base.read_writed=_hpatch_TFileStreamOutput_read_file;
    self->base.write=_TFileStreamOutput_write_file;
    self->m_fpos=curFileWritePos;
    self->m_offset=0;
    self->is_in_readModel=hpatch_FALSE;
    self->is_random_out=hpatch_FALSE;
    self->out_length=curFileWritePos;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cmpq $0x0, 0x20(%rdi)
jne 0x3f170
movq %rdx, %r14
movq %rdi, %rbx
andl $0x0, 0x38(%rdi)
movq %rsp, %rdx
andq $0x0, (%rdx)
leaq 0x185cc(%rip), %rax     # 0x57620
movq %rsi, %rdi
movq %rax, %rsi
callq 0x3f2ea
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x3f0c0
movq %rax, %r12
movq (%rsp), %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x3f364
testl %eax, %eax
je 0x3f0ca
leaq 0x20(%rbx), %rdi
movq %r12, (%rdi)
cmpq %r14, %r15
jbe 0x3f0fd
callq 0x3ec9e
callq 0x4050
movl $0x1b, (%rax)
movl 0x38(%rbx), %eax
cmpl $0x1b, %eax
je 0x3f0f9
testl %eax, %eax
jne 0x3f0ae
movl $0x1b, 0x38(%rbx)
movq 0x35f13(%rip), %rax     # 0x74fc8
movq (%rax), %r14
pushq $0x1b
popq %rbp
jmp 0x3f142
callq 0x4050
movq %rax, %r14
jmp 0x3f0e5
callq 0x4050
movq %rax, %r14
movl (%rax), %ebp
leaq 0x8(%rsp), %rdi
callq 0x3ec9e
testl %ebp, %ebp
je 0x3f0e5
movl %ebp, (%r14)
movl (%r14), %ebp
movl 0x38(%rbx), %eax
cmpl %ebp, %eax
sete %cl
testl %ebp, %ebp
sete %dl
orb %cl, %dl
je 0x3f131
xorl %ebx, %ebx
jmp 0x3f161
movq %rbx, (%rbx)
movq %r14, 0x8(%rbx)
leaq -0x369(%rip), %rax      # 0x3eda2
movq %rax, 0x10(%rbx)
leaq -0x2bf(%rip), %rax      # 0x3ee57
movq %rax, 0x18(%rbx)
movq %r15, 0x28(%rbx)
andq $0x0, 0x30(%rbx)
andq $0x0, 0x3c(%rbx)
movq %r15, 0x48(%rbx)
pushq $0x1
popq %rbx
jmp 0x3f161
testl %eax, %eax
jne 0x3f138
movl %ebp, 0x38(%rbx)
movq 0x35e89(%rip), %rax     # 0x74fc8
movq (%rax), %r14
movl %ebp, %edi
callq 0x40e0
leaq 0xf1a6(%rip), %rsi      # 0x4e2f6
xorl %ebx, %ebx
movq %r14, %rdi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4480
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x181cb(%rip), %rdi     # 0x57342
leaq 0x1812c(%rip), %rsi     # 0x572aa
leaq 0x18287(%rip), %rcx     # 0x5740c
movl $0x2a5, %edx            # imm = 0x2A5
callq 0x4230
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: import_fileOpenWithSize
static hpatch_FileHandle _import_fileOpenWithSize(const char* fileName_utf8,_FileModeType mode,hpatch_StreamPos_t* out_fileSize){
    hpatch_FileHandle file=0;
    file=_import_fileOpen(fileName_utf8,mode);
    if ((out_fileSize==0)||(file==0)) return file;
    
    if (_import_fileSeek64(file,0,SEEK_END)){
        if (_import_fileTell64(file,out_fileSize)){
            if (_import_fileSeek64(file,0,SEEK_SET)){
                return file;
            }
        }
    }

    //error clear
    _import_fileClose(&file);
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
callq 0x4380
movq %rax, %rbx
movq %rax, (%rsp)
testq %r14, %r14
sete %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x3f348
pushq $0x2
popq %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3f353
testl %eax, %eax
je 0x3f33e
movq %rbx, %rdi
callq 0x44e0
movq %rax, (%r14)
testq %rax, %rax
js 0x3f33e
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3f353
testl %eax, %eax
jne 0x3f348
movq %rsp, %rdi
callq 0x3ec9e
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libParallel/parallel_import.cpp
// Function: thread_parallel(int, void (*)(int, void*), void*, int, int)
void thread_parallel(int threadCount,TThreadRunCallBackProc threadProc,void* workData,
                     int isUseThisThread,int threadIndexOffset){
    for (int i=0; i<threadCount; ++i) {
        if ((i==threadCount-1)&&(isUseThisThread)){
            threadProc(i+threadIndexOffset,workData);
        }else{
            _TThreadProc tp={threadProc,i+threadIndexOffset,workData};
            std::thread t(tp);
            t.detach();
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, 0xc(%rsp)
movq %rdx, %r14
movq %rsi, %r15
xorl %ebx, %ebx
testl %edi, %edi
movl $0x0, %r12d
cmovgl %edi, %r12d
leal -0x1(%rdi), %r13d
movq %r8, 0x18(%rsp)
leal (%rdi,%r8), %eax
decl %eax
movl %eax, 0x8(%rsp)
leaq 0x10(%rsp), %rbp
cmpl %ebx, %r12d
je 0x3f479
cmpl $0x0, 0xc(%rsp)
sete %al
cmpl %ebx, %r13d
setne %cl
orb %al, %cl
jne 0x3f443
movl 0x8(%rsp), %edi
movq %r14, %rsi
callq *%r15
jmp 0x3f475
movq %r15, 0x20(%rsp)
movq 0x18(%rsp), %rax
addl %ebx, %eax
movl %eax, 0x28(%rsp)
movq %r14, 0x30(%rsp)
movq %rbp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x3f49e
movq %rbp, %rdi
callq 0x45f0
movq %rbp, %rdi
callq 0x11f70
incl %ebx
jmp 0x3f41b
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x11f70
movq %rbx, %rdi
callq 0x4600
nop
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libParallel/parallel_channel.cpp
// Function: CChannel_import::~_CChannel_import()
~_CChannel_import(){
        close();
        while (true) { //wait all thread exit
            {
                CAutoLocker locker(_locker);
                if (_waitingCount==0) break;
            }
            this_thread_yield(); //todo:优化?
        }
        locker_delete(_locker);
        assert(_dataList.empty()); // why? if saved resource then leaks
        condvar_delete(_acceptCond);
        condvar_delete(_sendCond);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x3f6b8
movq %rsp, %r14
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x1b906
movq 0x70(%rbx), %r15
movq %r14, %rdi
callq 0x1bacc
testq %r15, %r15
je 0x3f657
callq 0x3f3dd
jmp 0x3f634
movq (%rbx), %rdi
callq 0x3f382
movq 0x48(%rbx), %rax
cmpq 0x28(%rbx), %rax
jne 0x3f691
movq 0x10(%rbx), %rdi
callq 0x3f3b3
movq 0x8(%rbx), %rdi
callq 0x3f3b3
addq $0x18, %rbx
movq %rbx, %rdi
callq 0x3fb6c
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x17fd0(%rip), %rdi     # 0x57668
leaq 0x17fdb(%rip), %rsi     # 0x5767a
leaq 0x18000(%rip), %rcx     # 0x576a6
pushq $0x34
popq %rdx
callq 0x4230
jmp 0x3f6b0
movq %rax, %rdi
callq 0x84e7
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libParallel/parallel_channel.cpp
// Function: CChannel_import::close()
void close(){
        if (_isClosed) return;
        {
            CAutoLocker locker(_locker);
            if (_isClosed) return;
            _isClosed=true;
            condvar_broadcast(_sendCond);
            condvar_broadcast(_acceptCond);
        }
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpb $0x0, 0x78(%rdi)
jne 0x3f6f5
movq %rdi, %rbx
movq (%rdi), %rsi
movq %rsp, %rdi
callq 0x1b906
cmpb $0x0, 0x78(%rbx)
jne 0x3f6ed
movb $0x1, 0x78(%rbx)
movq 0x8(%rbx), %rdi
callq 0x3f3d8
movq 0x10(%rbx), %rdi
callq 0x3f3d8
movq %rsp, %rdi
callq 0x1bacc
addq $0x10, %rsp
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1bacc
movq %rbx, %rdi
callq 0x4600
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libParallel/parallel_channel.cpp
// Function: CChannel_import::is_can_fast_send(bool)
bool is_can_fast_send(bool isWait){
        if (_maxDataCount<0) return true;
        if (_maxDataCount==0) return false;

        CAutoLocker locker(_locker);
        while (true) {
            if (_isClosed) return false;
            if (_dataList.size()<(size_t)_maxDataCount) {
                return true;
            }else if(!isWait){
                return false;
            }//else wait
            ++_waitingCount;
            condvar_wait(_sendCond,&locker);
            --_waitingCount;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq 0x68(%rdi), %rax
testq %rax, %rax
js 0x3f772
je 0x3f777
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rsi
movq %rsp, %r15
movq %r15, %rdi
callq 0x1b906
leaq 0x18(%r14), %r12
xorb $0x1, %bl
cmpb $0x0, 0x78(%r14)
jne 0x3f77b
movq %r12, %rdi
callq 0x3fb9a
cmpq 0x68(%r14), %rax
setb %bpl
movl %ebp, %eax
orb %bl, %al
jne 0x3f77d
incq 0x70(%r14)
movq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x3f3ce
decq 0x70(%r14)
jmp 0x3f73f
movb $0x1, %bpl
jmp 0x3f785
xorl %ebp, %ebp
jmp 0x3f785
xorl %ebp, %ebp
movq %rsp, %rdi
callq 0x1bacc
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1bacc
movq %rbx, %rdi
callq 0x4600
nop
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libParallel/parallel_channel.cpp
// Function: CChannel_import::send(void*, bool)
bool send(TChanData data,bool isWait){
        assert(data!=0);
        {
            CAutoLocker locker(_locker);
            while (true) {
                if (_isClosed) return false;
                if ((_maxDataCount<=0)||(_dataList.size()<(size_t)_maxDataCount)) {
                    try{
                        _dataList.push_back(data);
                    }catch(...){
                        return false;
                    }
                    condvar_signal(_acceptCond);
                    if (_maxDataCount==0) //must wait accepted?
                        break;// to wait accepted
                    else
                        return true; //ok
                }else if(!isWait){
                    return false;
                }//else wait
                ++_waitingCount;
                condvar_wait(_sendCond,&locker);
                --_waitingCount;
            }
        }

        //wait accepted
        while (true) { //wait _dataList empty
            {
                CAutoLocker locker(_locker);
                if (_isClosed) break;
                if (_dataList.empty()) break;
            }
            this_thread_yield(); //todo:优化;
        }
        return true;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
testq %rsi, %rsi
je 0x3f831
movl %edx, %ebp
movq %rdi, %rbx
movq (%rdi), %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x1b906
leaq 0x18(%rbx), %r15
cmpb $0x0, 0x78(%rbx)
jne 0x3f85b
cmpq $0x0, 0x68(%rbx)
jle 0x3f80d
movq %r15, %rdi
callq 0x3fb9a
cmpq 0x68(%rbx), %rax
jb 0x3f80d
testb %bpl, %bpl
je 0x3f85b
incq 0x70(%rbx)
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x3f3ce
decq 0x70(%rbx)
jmp 0x3f7d7
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x3fbe2
movq 0x10(%rbx), %rdi
callq 0x3f3d3
cmpq $0x0, 0x68(%rbx)
sete %r14b
movb $0x1, %bpl
jmp 0x3f860
leaq 0x17e94(%rip), %rdi     # 0x576cc
leaq 0x17e3b(%rip), %rsi     # 0x5767a
leaq 0x17e8e(%rip), %rcx     # 0x576d4
pushq $0x55
popq %rdx
callq 0x4230
movq %rax, %rdi
callq 0x4130
callq 0x4550
xorl %ebp, %ebp
xorl %r14d, %r14d
movq %rsp, %rdi
callq 0x1bacc
testb %r14b, %r14b
je 0x3f8a3
movq %rsp, %r14
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x1b906
movq 0x28(%rbx), %r15
movq 0x48(%rbx), %r12
movb 0x78(%rbx), %r13b
movq %r14, %rdi
callq 0x1bacc
movb $0x1, %bpl
testb %r13b, %r13b
jne 0x3f8a3
cmpq %r15, %r12
je 0x3f8a3
callq 0x3f3dd
jmp 0x3f870
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3f8b6
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1bacc
movq %rbx, %rdi
callq 0x4600
nop
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libParallel/parallel_channel.cpp
// Function: CChannel_import::accept(bool)
TChanData accept(bool isWait){
        CAutoLocker locker(_locker);
        while (true) {
            if (!_dataList.empty()) {
                TChanData result=_dataList.front();
                _dataList.pop_front();
                if (!_isClosed)
                    condvar_signal(_sendCond);
                return result; //ok
            }else if(_isClosed){
                return 0;
            }else if(!isWait){
                return 0;
            }//else wait
            ++_waitingCount;
            condvar_wait(_acceptCond,&locker);
            --_waitingCount;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x1b906
xorb $0x1, %bpl
xorl %ebx, %ebx
movq 0x28(%r14), %rax
cmpq %rax, 0x48(%r14)
jne 0x3f918
movb 0x78(%r14), %al
orb %bpl, %al
jne 0x3f934
incq 0x70(%r14)
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0x3f3ce
decq 0x70(%r14)
jmp 0x3f8ef
leaq 0x18(%r14), %rdi
movq (%rax), %rbx
callq 0x3fdce
cmpb $0x0, 0x78(%r14)
jne 0x3f934
movq 0x8(%r14), %rdi
callq 0x3f3d3
leaq 0x8(%rsp), %rdi
callq 0x1bacc
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3f94e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1bacc
movq %rbx, %rdi
callq 0x4600
nop
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/adler32.c
// Function: adler32_combine_
local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {
    unsigned long sum1;
    unsigned long sum2;
    unsigned rem;

    /* for negative len, return invalid adler32 as a clue for debugging */
    if (len2 < 0)
        return 0xffffffffUL;

    /* the derivation of this formula is left as an exercise for the reader */
    MOD63(len2);                /* assumes len2 >= 0 */
    rem = (unsigned)len2;
    sum1 = adler1 & 0xffff;
    sum2 = rem * sum1;
    MOD(sum2);
    sum1 += (adler2 & 0xffff) + BASE - 1;
    sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
    if (sum1 >= BASE) sum1 -= BASE;
    if (sum1 >= BASE) sum1 -= BASE;
    if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1);
    if (sum2 >= BASE) sum2 -= BASE;
    return sum1 | (sum2 << 16);
}

// Assembly:
testq %rdx, %rdx
js 0x40176
movl $0xfff1, %r8d           # imm = 0xFFF1
movq %rdx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rcx
movl $0xffff, %edx           # imm = 0xFFFF
movq %rdi, %rax
andq %rdx, %rax
andq %rsi, %rdx
leaq (%rax,%rdx), %r9
leaq (%rax,%rdx), %r10
decq %r10
imull %ecx, %eax
movl $0xfff1, %r11d          # imm = 0xFFF1
xorl %edx, %edx
divl %r11d
addl $0xfff0, %r9d           # imm = 0xFFF0
shrl $0x10, %edi
shrl $0x10, %esi
addq %rdi, %rsi
subq %rcx, %rsi
addq %rdx, %rsi
leaq (%rsi,%r8), %rax
cmpl %r11d, %r9d
movl $0xfff0, %ecx           # imm = 0xFFF0
cmovaeq %r10, %rcx
movq $-0xfff1, %rdx          # imm = 0xFFFF000F
leaq (%rcx,%rdx), %rdi
cmpq %r8, %rcx
cmovbq %rcx, %rdi
addq %rdx, %rsi
cmpq $0x1ffe2, %rax          # imm = 0x1FFE2
cmovbq %rax, %rsi
movq %rsi, %rcx
shlq $0x10, %rcx
movabsq $-0xfff10000, %rax      # imm = 0xFFFFFFFF000F0000
addq %rcx, %rax
cmpq %r8, %rsi
cmovbq %rcx, %rax
orq %rdi, %rax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/compress.c
// Function: compress2
int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source,
                      uLong sourceLen, int level) {
    z_stream stream;
    int err;
    const uInt max = (uInt)-1;
    uLong left;

    left = *destLen;
    *destLen = 0;

    stream.zalloc = (alloc_func)0;
    stream.zfree = (free_func)0;
    stream.opaque = (voidpf)0;

    err = deflateInit(&stream, level);
    if (err != Z_OK) return err;

    stream.next_out = dest;
    stream.avail_out = 0;
    stream.next_in = (z_const Bytef *)source;
    stream.avail_in = 0;

    do {
        if (stream.avail_out == 0) {
            stream.avail_out = left > (uLong)max ? max : (uInt)left;
            left -= stream.avail_out;
        }
        if (stream.avail_in == 0) {
            stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen;
            sourceLen -= stream.avail_in;
        }
        err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH);
    } while (err == Z_OK);

    *destLen = stream.total_out;
    deflateEnd(&stream);
    return err == Z_STREAM_END ? Z_OK : err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %r14
movq %rsi, %rbx
movq (%rsi), %r12
andq $0x0, (%rsi)
movq %rdx, %rbp
movq %rdi, %r13
xorps %xmm0, %xmm0
leaq 0x8(%rsp), %rdi
movups %xmm0, 0x40(%rdi)
andq $0x0, 0x50(%rdi)
leaq 0xe0d6(%rip), %rdx      # 0x4e293
pushq $0x70
popq %rcx
movl %r8d, %esi
callq 0x4068c
testl %eax, %eax
jne 0x40258
leaq 0x8(%rsp), %r15
movq %r13, 0x18(%r15)
andl $0x0, 0x20(%r15)
movq %rbp, (%r15)
andl $0x0, 0x8(%r15)
xorl %eax, %eax
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x40205
cmpq %r13, %r12
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovbq %r12, %rax
movl %eax, 0x28(%rsp)
subq %rax, %r12
cmpl $0x0, 0x10(%rsp)
jne 0x4021f
cmpq %r13, %r14
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovbq %r14, %rax
movl %eax, 0x10(%rsp)
subq %rax, %r14
xorl %esi, %esi
testq %r14, %r14
sete %sil
shll $0x2, %esi
movq %r15, %rdi
callq 0x4126a
testl %eax, %eax
jne 0x4023d
movl 0x28(%rsp), %eax
jmp 0x401ee
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
movq 0x28(%rdi), %rax
movq %rax, (%rbx)
callq 0x4095e
xorl %eax, %eax
cmpl $0x1, %ebp
cmovnel %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/crc32.c
// Function: crc_word
local z_crc_t crc_word(z_word_t data) {
    int k;
    for (k = 0; k < W; k++)
        data = (data >> 8) ^ crc_table[data & 0xff];
    return (z_crc_t)data;
}

// Assembly:
movq %rdi, %rax
pushq $0x8
popq %rcx
leaq 0x17197(%rip), %rdx     # 0x57740
subl $0x1, %ecx
jb 0x405c0
movq %rax, %rsi
shrq $0x8, %rsi
movzbl %al, %eax
movl (%rdx,%rax,4), %eax
xorq %rsi, %rax
jmp 0x405a9
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/crc32.c
// Function: multmodp
local z_crc_t multmodp(z_crc_t a, z_crc_t b) {
    z_crc_t m, p;

    m = (z_crc_t)1 << 31;
    p = 0;
    for (;;) {
        if (a & m) {
            p ^= b;
            if ((a & (m - 1)) == 0)
                break;
        }
        m >>= 1;
        b = b & 1 ? (b >> 1) ^ POLY : b >> 1;
    }
    return p;
}

// Assembly:
xorl %eax, %eax
movl $0x80000000, %ecx       # imm = 0x80000000
testl %edi, %ecx
je 0x40607
xorl %esi, %eax
leal -0x1(%rcx), %edx
testl %edi, %edx
je 0x40624
shrl %ecx
movl %esi, %edx
shrl %edx
movl %edx, %r8d
xorl $0xedb88320, %r8d       # imm = 0xEDB88320
testb $0x1, %sil
cmovel %edx, %r8d
movl %r8d, %esi
jmp 0x405fa
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/crc32.c
// Function: x2nmodp
local z_crc_t x2nmodp(z_off64_t n, unsigned k) {
    z_crc_t p;

    p = (z_crc_t)1 << 31;           /* x^0 == 1 */
    while (n) {
        if (n & 1)
            p = multmodp(x2n_table[k & 31], p);
        n >>= 1;
        k++;
    }
    return p;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x80000000, %eax       # imm = 0x80000000
pushq $0x3
popq %rbp
leaq 0x19505(%rip), %r14     # 0x59b40
testq %rbx, %rbx
je 0x4065c
testb $0x1, %bl
je 0x40655
movl %ebp, %ecx
andl $0x1f, %ecx
movl (%r14,%rcx,4), %edi
movl %eax, %esi
callq 0x405f3
sarq %rbx
incl %ebp
jmp 0x4063b
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: deflateEnd
int ZEXPORT deflateEnd(z_streamp strm) {
    int status;

    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;

    status = strm->state->status;

    /* Deallocate in reverse order of allocations: */
    TRY_FREE(strm, strm->state->pending_buf);
    TRY_FREE(strm, strm->state->head);
    TRY_FREE(strm, strm->state->prev);
    TRY_FREE(strm, strm->state->window);

    ZFREE(strm, strm->state);
    strm->state = Z_NULL;

    return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x40c8e
testl %eax, %eax
je 0x40972
pushq $-0x2
popq %rax
jmp 0x409ef
movq 0x38(%rbx), %rsi
movl 0x8(%rsi), %ebp
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x40990
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x78(%rsi), %rax
testq %rax, %rax
je 0x409a7
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x70(%rsi), %rax
testq %rax, %rax
je 0x409be
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x60(%rsi), %rax
testq %rax, %rax
je 0x409d5
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x50(%rbx), %rdi
callq *0x48(%rbx)
andq $0x0, 0x38(%rbx)
xorl %eax, %eax
cmpl $0x71, %ebp
setne %al
leal (%rax,%rax,2), %eax
addl $-0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: deflateReset
int ZEXPORT deflateReset(z_streamp strm) {
    int ret;

    ret = deflateResetKeep(strm);
    if (ret == Z_OK)
        lm_init(strm->state);
    return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x40f4f
movl %eax, %ebx
testl %eax, %eax
jne 0x40ab4
movq 0x38(%r14), %r14
movl 0x50(%r14), %eax
addq %rax, %rax
movq %rax, 0x68(%r14)
movq 0x78(%r14), %rdi
movl 0x84(%r14), %edx
decl %edx
andw $0x0, (%rdi,%rdx,2)
addq %rdx, %rdx
xorl %esi, %esi
callq 0x41f0
movslq 0xc4(%r14), %rax
shlq $0x4, %rax
leaq 0x341f7(%rip), %rcx     # 0x74c40
movzwl 0x2(%rax,%rcx), %edx
movl %edx, 0xc0(%r14)
movzwl (%rax,%rcx), %edx
movl %edx, 0xcc(%r14)
movzwl 0x4(%rax,%rcx), %edx
movl %edx, 0xd0(%r14)
movzwl 0x6(%rax,%rcx), %eax
movl %eax, 0xbc(%r14)
andq $0x0, 0x98(%r14)
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, 0xb4(%r14)
andl $0x0, 0x172c(%r14)
movl $0x2, 0xa0(%r14)
andq $0x0, 0xa8(%r14)
andl $0x0, 0x80(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: deflateStateCheck
local int deflateStateCheck(z_streamp strm) {
    deflate_state *s;
    if (strm == Z_NULL ||
        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
        return 1;
    s = strm->state;
    if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE &&
#ifdef GZIP
                                           s->status != GZIP_STATE &&
#endif
                                           s->status != EXTRA_STATE &&
                                           s->status != NAME_STATE &&
                                           s->status != COMMENT_STATE &&
                                           s->status != HCRC_STATE &&
                                           s->status != BUSY_STATE &&
                                           s->status != FINISH_STATE))
        return 1;
    return 0;
}

// Assembly:
pushq $0x1
popq %rax
testq %rdi, %rdi
je 0x40cb2
cmpq $0x0, 0x40(%rdi)
je 0x40cb2
cmpq $0x0, 0x48(%rdi)
je 0x40cb2
movq 0x38(%rdi), %rcx
testq %rcx, %rcx
je 0x40cb2
cmpq %rdi, (%rcx)
je 0x40cb3
retq
movl 0x8(%rcx), %ecx
leal -0x39(%rcx), %edx
cmpl $0x38, %edx
ja 0x40cd1
movabsq $0x100400400011001, %rsi # imm = 0x100400400011001
btq %rdx, %rsi
jae 0x40cd1
xorl %eax, %eax
retq
cmpl $0x29a, %ecx            # imm = 0x29A
je 0x40cce
cmpl $0x2a, %ecx
jne 0x40cb2
jmp 0x40cce
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: deflateGetDictionary
int ZEXPORT deflateGetDictionary(z_streamp strm, Bytef *dictionary,
                                 uInt *dictLength) {
    deflate_state *s;
    uInt len;

    if (deflateStateCheck(strm))
        return Z_STREAM_ERROR;
    s = strm->state;
    len = s->strstart + s->lookahead;
    if (len > s->w_size)
        len = s->w_size;
    if (dictionary != Z_NULL && len)
        zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len);
    if (dictLength != Z_NULL)
        *dictLength = len;
    return Z_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x40c8e
testl %eax, %eax
je 0x40f03
pushq $-0x2
popq %rax
jmp 0x40f44
movq 0x38(%r15), %rax
movl 0x50(%rax), %ebp
movl 0xac(%rax), %esi
movl 0xb4(%rax), %ecx
leal (%rcx,%rsi), %edx
cmpl %ebp, %edx
cmovbl %edx, %ebp
testq %r14, %r14
je 0x40f3b
testl %ebp, %ebp
je 0x40f3b
addq 0x60(%rax), %rsi
addq %rcx, %rsi
movl %ebp, %edx
subq %rdx, %rsi
movq %r14, %rdi
callq 0x42c0
xorl %eax, %eax
testq %rbx, %rbx
je 0x40f44
movl %ebp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: deflatePending
int ZEXPORT deflatePending(z_streamp strm, unsigned *pending, int *bits) {
    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
    if (pending != Z_NULL)
        *pending = strm->state->pending;
    if (bits != Z_NULL)
        *bits = strm->state->bi_valid;
    return Z_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x40c8e
testl %eax, %eax
je 0x4102a
pushq $-0x2
popq %rax
jmp 0x4104c
testq %r15, %r15
je 0x41039
movq 0x38(%r14), %rax
movl 0x28(%rax), %eax
movl %eax, (%r15)
xorl %eax, %eax
testq %rbx, %rbx
je 0x4104c
movq 0x38(%r14), %rcx
movl 0x1734(%rcx), %ecx
movl %ecx, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: deflatePrime
int ZEXPORT deflatePrime(z_streamp strm, int bits, int value) {
    deflate_state *s;
    int put;

    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
    s = strm->state;
#ifdef LIT_MEM
    if (bits < 0 || bits > 16 ||
        (uchf *)s->d_buf < s->pending_out + ((Buf_size + 7) >> 3))
        return Z_BUF_ERROR;
#else
    if (bits < 0 || bits > 16 ||
        s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
        return Z_BUF_ERROR;
#endif
    do {
        put = Buf_size - s->bi_valid;
        if (put > bits)
            put = bits;
        s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid);
        s->bi_valid += put;
        _tr_flush_bits(s);
        value >>= put;
        bits -= put;
    } while (bits);
    return Z_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0x40c8e
testl %eax, %eax
je 0x41072
pushq $-0x2
popq %rax
jmp 0x410e1
pushq $-0x5
popq %rax
cmpl $0x10, %ebp
ja 0x410e1
movq 0x38(%r14), %r14
movq 0x20(%r14), %rcx
addq $0x2, %rcx
cmpq %rcx, 0x1700(%r14)
jb 0x410e1
pushq $0x10
popq %r12
pushq $-0x1
popq %r13
movl 0x1734(%r14), %eax
movl %r12d, %r15d
subl %eax, %r15d
cmpl %ebp, %r15d
cmovgel %ebp, %r15d
movl %r13d, %edx
movl %r15d, %ecx
shll %cl, %edx
notl %edx
andl %ebx, %edx
movl %eax, %ecx
shll %cl, %edx
orw %dx, 0x1730(%r14)
addl %r15d, %eax
movl %eax, 0x1734(%r14)
movq %r14, %rdi
callq 0x47556
movl %r15d, %ecx
sarl %cl, %ebx
subl %r15d, %ebp
jne 0x41097
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: deflateParams
int ZEXPORT deflateParams(z_streamp strm, int level, int strategy) {
    deflate_state *s;
    compress_func func;

    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
    s = strm->state;

#ifdef FASTEST
    if (level != 0) level = 1;
#else
    if (level == Z_DEFAULT_COMPRESSION) level = 6;
#endif
    if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) {
        return Z_STREAM_ERROR;
    }
    func = configuration_table[s->level].func;

    if ((strategy != s->strategy || func != configuration_table[level].func) &&
        s->last_flush != -2) {
        /* Flush the last buffer: */
        int err = deflate(strm, Z_BLOCK);
        if (err == Z_STREAM_ERROR)
            return err;
        if (strm->avail_in || (s->strstart - s->block_start) + s->lookahead)
            return Z_BUF_ERROR;
    }
    if (s->level != level) {
        if (s->level == 0 && s->matches != 0) {
            if (s->matches == 1)
                slide_hash(s);
            else
                CLEAR_HASH(s);
            s->matches = 0;
        }
        s->level = level;
        s->max_lazy_match   = configuration_table[level].max_lazy;
        s->good_match       = configuration_table[level].good_length;
        s->nice_match       = configuration_table[level].nice_length;
        s->max_chain_length = configuration_table[level].max_chain;
    }
    s->strategy = strategy;
    return Z_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
callq 0x40c8e
pushq $-0x2
popq %rbp
testl %eax, %eax
jne 0x41259
cmpl $-0x1, %r14d
pushq $0x6
popq %r12
cmovnel %r14d, %r12d
cmpl $0xa, %r12d
setae %al
cmpl $0x5, %ebx
setae %cl
orb %al, %cl
jne 0x41259
movq 0x38(%r15), %r14
leaq 0x33b01(%rip), %rdx     # 0x74c40
movl %r12d, %r13d
cmpl %ebx, 0xc8(%r14)
jne 0x41169
movslq 0xc4(%r14), %rax
shlq $0x4, %rax
movq 0x8(%rax,%rdx), %rax
movq %r13, %rcx
shlq $0x4, %rcx
cmpq 0x8(%rcx,%rdx), %rax
je 0x41170
cmpl $-0x2, 0x4c(%r14)
jne 0x411a5
movl 0xc4(%r14), %eax
cmpl %r12d, %eax
je 0x41250
testl %eax, %eax
jne 0x41211
movl 0x1728(%r14), %eax
testl %eax, %eax
je 0x41211
movq %rdx, %r15
cmpl $0x1, %eax
jne 0x411ea
movq %r14, %rdi
callq 0x421d8
jmp 0x41206
pushq $0x5
popq %rsi
movq %r15, %rdi
callq 0x4126a
leaq 0x33a89(%rip), %rdx     # 0x74c40
cmpl $-0x2, %eax
je 0x41259
pushq $-0x5
popq %rbp
cmpl $0x0, 0x8(%r15)
jne 0x41259
movl 0xac(%r14), %eax
movl 0xb4(%r14), %ecx
subq 0x98(%r14), %rax
addq %rax, %rcx
je 0x41170
jmp 0x41259
movq 0x78(%r14), %rdi
movl 0x84(%r14), %edx
decl %edx
andw $0x0, (%rdi,%rdx,2)
addq %rdx, %rdx
xorl %esi, %esi
callq 0x41f0
andl $0x0, 0x1728(%r14)
movq %r15, %rdx
movl %r12d, 0xc4(%r14)
shlq $0x4, %r13
movzwl 0x2(%r13,%rdx), %eax
movl %eax, 0xc0(%r14)
movzwl (%r13,%rdx), %eax
movl %eax, 0xcc(%r14)
movzwl 0x4(%r13,%rdx), %eax
movl %eax, 0xd0(%r14)
movzwl 0x6(%r13,%rdx), %eax
movl %eax, 0xbc(%r14)
movl %ebx, 0xc8(%r14)
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_O2/sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: deflateTune
int ZEXPORT deflateTune(z_streamp strm, int good_length, int max_lazy,
                        int nice_length, int max_chain) {
    deflate_state *s;

    if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
    s = strm->state;
    s->good_match = (uInt)good_length;
    s->max_lazy_match = (uInt)max_lazy;
    s->nice_match = nice_length;
    s->max_chain_length = (uInt)max_chain;
    return Z_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
callq 0x40c8e
testl %eax, %eax
je 0x4224e
pushq $-0x2
popq %rax
jmp 0x4226f
movq 0x38(%r12), %rax
movl %r15d, 0xcc(%rax)
movl %r14d, 0xc0(%rax)
movl %ebp, 0xd0(%rax)
movl %ebx, 0xbc(%rax)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: flush_pending
local void flush_pending(z_streamp strm) {
    unsigned len;
    deflate_state *s = strm->state;

    _tr_flush_bits(s);
    len = s->pending;
    if (len > strm->avail_out) len = strm->avail_out;
    if (len == 0) return;

    zmemcpy(strm->next_out, s->pending_out, len);
    strm->next_out  += len;
    s->pending_out  += len;
    strm->total_out += len;
    strm->avail_out -= len;
    s->pending      -= len;
    if (s->pending == 0) {
        s->pending_out = s->pending_buf;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x38(%rdi), %rbx
movq %rbx, %rdi
callq 0x47556
movl 0x28(%rbx), %ebp
movl 0x20(%r14), %eax
cmpl %ebp, %eax
cmovbl %eax, %ebp
testl %ebp, %ebp
je 0x4242c
movq 0x18(%r14), %rdi
movq 0x20(%rbx), %rsi
movl %ebp, %r15d
movq %r15, %rdx
callq 0x42c0
addq %r15, 0x18(%r14)
addq %r15, 0x20(%rbx)
addq %r15, 0x28(%r14)
subl %ebp, 0x20(%r14)
subq %r15, 0x28(%rbx)
jne 0x4242c
movq 0x10(%rbx), %rax
movq %rax, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/deflate.c
// Function: read_buf
local unsigned read_buf(z_streamp strm, Bytef *buf, unsigned size) {
    unsigned len = strm->avail_in;

    if (len > size) len = size;
    if (len == 0) return 0;

    strm->avail_in  -= len;

    zmemcpy(buf, strm->next_in, len);
    if (strm->state->wrap == 1) {
        strm->adler = adler32(strm->adler, buf, len);
    }
#ifdef GZIP
    else if (strm->state->wrap == 2) {
        strm->adler = crc32(strm->adler, buf, len);
    }
#endif
    strm->next_in  += len;
    strm->total_in += len;

    return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl 0x8(%rdi), %eax
cmpl %edx, %eax
cmovbl %eax, %ebx
testl %ebx, %ebx
je 0x42aa6
movq %rsi, %r12
movq %rdi, %r14
subl %ebx, %eax
movl %eax, 0x8(%rdi)
movq (%rdi), %rsi
movl %ebx, %r15d
movq %r12, %rdi
movq %r15, %rdx
callq 0x42c0
movq 0x38(%r14), %rax
movl 0x30(%rax), %eax
cmpl $0x2, %eax
je 0x42a8d
cmpl $0x1, %eax
jne 0x42a9f
movq 0x60(%r14), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x400c8
jmp 0x42a9b
movq 0x60(%r14), %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x405c1
movq %rax, 0x60(%r14)
addq %r15, (%r14)
addq %r15, 0x10(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/infback.c
// Function: inflateBackInit_
int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits,
                             unsigned char FAR *window, const char *version,
                             int stream_size) {
    struct inflate_state FAR *state;

    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
        stream_size != (int)(sizeof(z_stream)))
        return Z_VERSION_ERROR;
    if (strm == Z_NULL || window == Z_NULL ||
        windowBits < 8 || windowBits > 15)
        return Z_STREAM_ERROR;
    strm->msg = Z_NULL;                 /* in case we return an error */
    if (strm->zalloc == (alloc_func)0) {
#ifdef Z_SOLO
        return Z_STREAM_ERROR;
#else
        strm->zalloc = zcalloc;
        strm->opaque = (voidpf)0;
#endif
    }
    if (strm->zfree == (free_func)0)
#ifdef Z_SOLO
        return Z_STREAM_ERROR;
#else
    strm->zfree = zcfree;
#endif
    state = (struct inflate_state FAR *)ZALLOC(strm, 1,
                                               sizeof(struct inflate_state));
    if (state == Z_NULL) return Z_MEM_ERROR;
    Tracev((stderr, "inflate: allocated\n"));
    strm->state = (struct internal_state FAR *)state;
    state->dmax = 32768U;
    state->wbits = (uInt)windowBits;
    state->wsize = 1U << windowBits;
    state->window = window;
    state->wnext = 0;
    state->whave = 0;
    state->sane = 1;
    return Z_OK;
}

// Assembly:
pushq $-0x6
popq %rax
testq %rcx, %rcx
je 0x43731
cmpl $0x70, %r8d
jne 0x43731
cmpb $0x31, (%rcx)
jne 0x43731
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
leal -0x10(%r14), %ecx
pushq $-0x2
popq %rax
cmpl $-0x8, %ecx
jb 0x43727
movq %rdi, %r15
testq %rdi, %rdi
je 0x43727
movq %rdx, %rbx
testq %rdx, %rdx
je 0x43727
andq $0x0, 0x30(%r15)
movq 0x40(%r15), %rax
testq %rax, %rax
jne 0x436cf
leaq 0x5614(%rip), %rax      # 0x48cda
movq %rax, 0x40(%r15)
andq $0x0, 0x50(%r15)
cmpq $0x0, 0x48(%r15)
jne 0x436e1
leaq 0x5607(%rip), %rcx      # 0x48ce4
movq %rcx, 0x48(%r15)
movq 0x50(%r15), %rdi
pushq $0x1
popq %rbp
movl %ebp, %esi
movl $0x1bf8, %edx           # imm = 0x1BF8
callq *%rax
testq %rax, %rax
je 0x43724
movq %rax, 0x38(%r15)
movl $0x8000, 0x1c(%rax)     # imm = 0x8000
movl %r14d, 0x38(%rax)
movl %r14d, %ecx
shll %cl, %ebp
movl %ebp, 0x3c(%rax)
movq %rbx, 0x48(%rax)
andq $0x0, 0x40(%rax)
movl $0x1, 0x1be8(%rax)
xorl %eax, %eax
jmp 0x43727
pushq $-0x4
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/infback.c
// Function: inflateBackEnd
int ZEXPORT inflateBackEnd(z_streamp strm) {
    if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
        return Z_STREAM_ERROR;
    ZFREE(strm, strm->state);
    strm->state = Z_NULL;
    Tracev((stderr, "inflate: end\n"));
    return Z_OK;
}

// Assembly:
pushq $-0x2
popq %rax
testq %rdi, %rdi
je 0x4456b
pushq %rbx
movq %rdi, %rbx
movq 0x38(%rdi), %rsi
testq %rsi, %rsi
je 0x4456a
movq 0x48(%rbx), %rcx
testq %rcx, %rcx
je 0x4456a
movq 0x50(%rbx), %rdi
callq *%rcx
andq $0x0, 0x38(%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateResetKeep
int ZEXPORT inflateResetKeep(z_streamp strm) {
    struct inflate_state FAR *state;

    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
    strm->total_in = strm->total_out = state->total = 0;
    strm->msg = Z_NULL;
    if (state->wrap)        /* to support ill-conceived Java test suite */
        strm->adler = state->wrap & 1;
    state->mode = HEAD;
    state->last = 0;
    state->havedict = 0;
    state->flags = -1;
    state->dmax = 32768U;
    state->head = Z_NULL;
    state->hold = 0;
    state->bits = 0;
    state->lencode = state->distcode = state->next = state->codes;
    state->sane = 1;
    state->back = -1;
    Tracev((stderr, "inflate: reset\n"));
    return Z_OK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x44ae0
testl %eax, %eax
je 0x44a66
pushq $-0x2
popq %rax
jmp 0x44ade
movq 0x38(%rbx), %rax
andq $0x0, 0x28(%rax)
andq $0x0, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movl 0x10(%rax), %ecx
testq %rcx, %rcx
je 0x44a8a
andl $0x1, %ecx
movq %rcx, 0x60(%rbx)
movq $0x3f34, 0x8(%rax)      # imm = 0x3F34
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
movq %rcx, 0x14(%rax)
movl $0x8000, 0x1c(%rax)     # imm = 0x8000
andq $0x0, 0x30(%rax)
andq $0x0, 0x50(%rax)
andl $0x0, 0x58(%rax)
leaq 0x558(%rax), %rcx
movq %rcx, 0x90(%rax)
movq %rcx, 0x70(%rax)
movq %rcx, 0x68(%rax)
movabsq $-0xffffffff, %rcx      # imm = 0xFFFFFFFF00000001
movq %rcx, 0x1be8(%rax)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateStateCheck
local int inflateStateCheck(z_streamp strm) {
    struct inflate_state FAR *state;
    if (strm == Z_NULL ||
        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
        return 1;
    state = (struct inflate_state FAR *)strm->state;
    if (state == Z_NULL || state->strm != strm ||
        state->mode < HEAD || state->mode > SYNC)
        return 1;
    return 0;
}

// Assembly:
pushq $0x1
popq %rax
testq %rdi, %rdi
je 0x44b04
cmpq $0x0, 0x40(%rdi)
je 0x44b04
cmpq $0x0, 0x48(%rdi)
je 0x44b04
movq 0x38(%rdi), %rcx
testq %rcx, %rcx
je 0x44b04
cmpq %rdi, (%rcx)
je 0x44b05
retq
movl $0xffffc0ac, %edx       # imm = 0xFFFFC0AC
addl 0x8(%rcx), %edx
xorl %eax, %eax
cmpl $-0x20, %edx
setb %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateReset
int ZEXPORT inflateReset(z_streamp strm) {
    struct inflate_state FAR *state;

    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
    state->wsize = 0;
    state->whave = 0;
    state->wnext = 0;
    return inflateResetKeep(strm);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x44ae0
testl %eax, %eax
je 0x44b28
pushq $-0x2
popq %rax
popq %rbx
retq
movq 0x38(%rbx), %rax
andq $0x0, 0x3c(%rax)
andl $0x0, 0x44(%rax)
movq %rbx, %rdi
popq %rbx
jmp 0x44a54
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateReset2
int ZEXPORT inflateReset2(z_streamp strm, int windowBits) {
    int wrap;
    struct inflate_state FAR *state;

    /* get the state */
    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;

    /* extract wrap request from windowBits parameter */
    if (windowBits < 0) {
        if (windowBits < -15)
            return Z_STREAM_ERROR;
        wrap = 0;
        windowBits = -windowBits;
    }
    else {
        wrap = (windowBits >> 4) + 5;
#ifdef GUNZIP
        if (windowBits < 48)
            windowBits &= 15;
#endif
    }

    /* set number of window bits, free window if different */
    if (windowBits && (windowBits < 8 || windowBits > 15))
        return Z_STREAM_ERROR;
    if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) {
        ZFREE(strm, state->window);
        state->window = Z_NULL;
    }

    /* update state and reset the rest of it */
    state->wrap = wrap;
    state->wbits = (unsigned)windowBits;
    return inflateReset(strm);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x44ae0
testl %eax, %eax
je 0x44b61
pushq $-0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x38(%rbx), %r14
testl %ebp, %ebp
js 0x44b81
movl %ebp, %r15d
shrl $0x4, %r15d
addl $0x5, %r15d
movl %ebp, %eax
andl $0xf, %eax
cmpl $0x30, %ebp
cmovbl %eax, %ebp
jmp 0x44b8b
cmpl $-0xf, %ebp
jb 0x44b53
negl %ebp
xorl %r15d, %r15d
cmpl $0xf, %ebp
ja 0x44b53
movl $0xff01, %eax           # imm = 0xFF01
btl %ebp, %eax
jae 0x44b53
movq 0x48(%r14), %rsi
testq %rsi, %rsi
je 0x44bb5
cmpl %ebp, 0x38(%r14)
je 0x44bb5
movq 0x50(%rbx), %rdi
callq *0x48(%rbx)
andq $0x0, 0x48(%r14)
movl %r15d, 0x10(%r14)
movl %ebp, 0x38(%r14)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x44b16
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflateInit2_
int ZEXPORT inflateInit2_(z_streamp strm, int windowBits,
                          const char *version, int stream_size) {
    int ret;
    struct inflate_state FAR *state;

    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
        stream_size != (int)(sizeof(z_stream)))
        return Z_VERSION_ERROR;
    if (strm == Z_NULL) return Z_STREAM_ERROR;
    strm->msg = Z_NULL;                 /* in case we return an error */
    if (strm->zalloc == (alloc_func)0) {
#ifdef Z_SOLO
        return Z_STREAM_ERROR;
#else
        strm->zalloc = zcalloc;
        strm->opaque = (voidpf)0;
#endif
    }
    if (strm->zfree == (free_func)0)
#ifdef Z_SOLO
        return Z_STREAM_ERROR;
#else
        strm->zfree = zcfree;
#endif
    state = (struct inflate_state FAR *)
            ZALLOC(strm, 1, sizeof(struct inflate_state));
    if (state == Z_NULL) return Z_MEM_ERROR;
    Tracev((stderr, "inflate: allocated\n"));
    strm->state = (struct internal_state FAR *)state;
    state->strm = strm;
    state->window = Z_NULL;
    state->mode = HEAD;     /* to pass state test in inflateReset2() */
    ret = inflateReset2(strm, windowBits);
    if (ret != Z_OK) {
        ZFREE(strm, state);
        strm->state = Z_NULL;
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
pushq $-0x6
popq %r14
testq %rdx, %rdx
je 0x44c82
cmpl $0x70, %ecx
jne 0x44c82
cmpb $0x31, (%rdx)
jne 0x44c82
movq %rdi, %rbx
testq %rdi, %rdi
je 0x44c7a
movl %esi, %ebp
andq $0x0, 0x30(%rbx)
movq 0x40(%rbx), %rax
testq %rax, %rax
jne 0x44c1d
leaq 0x40c6(%rip), %rax      # 0x48cda
movq %rax, 0x40(%rbx)
andq $0x0, 0x50(%rbx)
cmpq $0x0, 0x48(%rbx)
jne 0x44c2f
leaq 0x40b9(%rip), %rcx      # 0x48ce4
movq %rcx, 0x48(%rbx)
movq 0x50(%rbx), %rdi
pushq $0x1
popq %rsi
movl $0x1bf8, %edx           # imm = 0x1BF8
callq *%rax
testq %rax, %rax
je 0x44c7e
movq %rax, %r15
movq %rax, 0x38(%rbx)
movq %rbx, (%rax)
andq $0x0, 0x48(%rax)
movl $0x3f34, 0x8(%rax)      # imm = 0x3F34
movq %rbx, %rdi
movl %ebp, %esi
callq 0x44b3e
testl %eax, %eax
je 0x44c90
movl %eax, %r14d
movq 0x50(%rbx), %rdi
movq %r15, %rsi
callq *0x48(%rbx)
andq $0x0, 0x38(%rbx)
jmp 0x44c82
pushq $-0x2
jmp 0x44c80
pushq $-0x4
popq %r14
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x44c82
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/zlib1.3.1/inflate.c
// Function: inflatePrime
int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) {
    struct inflate_state FAR *state;

    if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
    if (bits == 0)
        return Z_OK;
    state = (struct inflate_state FAR *)strm->state;
    if (bits < 0) {
        state->hold = 0;
        state->bits = 0;
        return Z_OK;
    }
    if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR;
    value &= (1L << bits) - 1;
    state->hold += (unsigned)value << state->bits;
    state->bits += (uInt)bits;
    return Z_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
callq 0x44ae0
movl %eax, %ecx
pushq $-0x2
popq %rax
testl %ecx, %ecx
jne 0x44cff
testl %r14d, %r14d
je 0x44cfd
movq 0x38(%r15), %rsi
js 0x44cf4
cmpl $0x10, %r14d
ja 0x44cff
movl 0x58(%rsi), %edx
leal (%rdx,%r14), %edi
cmpl $0x20, %edi
ja 0x44cff
pushq $-0x1
popq %rax
movl %r14d, %ecx
shlq %cl, %rax
notl %eax
andl %ebx, %eax
movl %edx, %ecx
shll %cl, %eax
addq %rax, 0x50(%rsi)
movl %edi, 0x58(%rsi)
jmp 0x44cfd
andq $0x0, 0x50(%rsi)
andl $0x0, 0x58(%rsi)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq