LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: hpatch_removeFile
hpatch_BOOL hpatch_removeFile(const char* fileName_utf8){
    _path_noEndDirSeparator(fileName,fileName_utf8);{
#if (_IS_USED_WIN32_UTF8_WAPI)
        int     wsize;
        wchar_t path_w[hpatch_kPathMaxSize];
        wsize=_utf8FileName_to_w(fileName,path_w,hpatch_kPathMaxSize);
        if (wsize<=0) return hpatch_FALSE;
        return 0==_wremove(path_w);
#else
        return 0==remove(fileName);
#endif
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
callq 0x4140
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x47a0e
movq %rax, %r14
testq %rax, %rax
je 0x47a1d
xorl %eax, %eax
cmpb $0x2f, -0x1(%rbx,%r14)
sete %al
subq %rax, %r14
jmp 0x47a20
callq 0x4050
movl $0x24, (%rax)
xorl %eax, %eax
jmp 0x47a47
xorl %r14d, %r14d
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4290
movb $0x0, (%rsp,%r14)
movq %r15, %rdi
callq 0x4600
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: hpatch_removeDir
hpatch_BOOL hpatch_removeDir(const char* dirName_utf8){
    _path_noEndDirSeparator(dirName,dirName_utf8);{
#if (_IS_USED_WIN32_UTF8_WAPI)
        int     wsize;
        wchar_t path_w[hpatch_kPathMaxSize];
        wsize=_utf8FileName_to_w(dirName,path_w,hpatch_kPathMaxSize);
        if (wsize<=0) return hpatch_FALSE;
        return 0==_wrmdir(path_w);
#else
#   ifdef _MSC_VER
        return 0==_rmdir(dirName);
#   else
        return 0==rmdir(dirName);
#   endif
#endif
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
callq 0x4140
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x47a88
movq %rax, %r14
testq %rax, %rax
je 0x47a97
xorl %eax, %eax
cmpb $0x2f, -0x1(%rbx,%r14)
sete %al
subq %rax, %r14
jmp 0x47a9a
callq 0x4050
movl $0x24, (%rax)
xorl %eax, %eax
jmp 0x47ac1
xorl %r14d, %r14d
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4290
movb $0x0, (%rsp,%r14)
movq %r15, %rdi
callq 0x4130
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: hpatch_makeNewDir
hpatch_BOOL hpatch_makeNewDir(const char* dirName_utf8){
    hpatch_TPathType type;
    _path_noEndDirSeparator(path,dirName_utf8);
    if (!_hpatch_getPathStat_noEndDirSeparator(path,&type,0,0)) return hpatch_FALSE; //error
    switch (type) {
        case kPathType_dir :{ return hpatch_TRUE; } break; //exist
        case kPathType_file:{ _set_errno_new(EPERM); return hpatch_FALSE; } break; //error, not overwite
        case kPathType_notExist:{
#if (_IS_USED_WIN32_UTF8_WAPI)
            int     wsize;
            wchar_t path_w[hpatch_kPathMaxSize];
            wsize=_utf8FileName_to_w(path,path_w,hpatch_kPathMaxSize);
            if (wsize<=0) return hpatch_FALSE;
            return 0==_wmkdir(path_w);
#else
#   ifdef _MSC_VER
            return 0==_mkdir(path);
#   else
#       if defined(__MINGW32__) && defined(_WIN32)
            return 0==mkdir(path);
#       else
            const mode_t kDefalutMode=S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH;//0755
            return 0==mkdir(path,kDefalutMode);
#       endif
#   endif
#endif
        } break;
    }
    return hpatch_FALSE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movq %rdi, %r14
callq 0x4140
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x47b0b
movq %rax, %r15
xorl %ebx, %ebx
testq %rax, %rax
je 0x47b1a
xorl %eax, %eax
cmpb $0x2f, -0x1(%r14,%r15)
sete %al
subq %rax, %r15
jmp 0x47b1d
callq 0x4050
movl $0x24, (%rax)
xorl %ebx, %ebx
jmp 0x47b87
xorl %r15d, %r15d
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x4290
movb $0x0, 0x10(%rsp,%r15)
leaq 0xc(%rsp), %rsi
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x47665
testl %eax, %eax
je 0x47b87
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x47b71
cmpl $0x2, %eax
je 0x47b6a
cmpl $0x1, %eax
jne 0x47b87
callq 0x4050
movl $0x1, (%rax)
jmp 0x47b87
movl $0x1, %ebx
jmp 0x47b87
leaq 0x10(%rsp), %rdi
movl $0x1ed, %esi            # imm = 0x1ED
callq 0x4160
xorl %ebx, %ebx
testl %eax, %eax
sete %bl
movl %ebx, %eax
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: hpatch_setIsExecuteFile
hpatch_BOOL hpatch_setIsExecuteFile(const char* fileName){
#ifdef _WIN32
    return hpatch_TRUE; // now, not need execute info
#else
    hpatch_TPathType type;
    size_t           st_mode=0;
    if (!_hpatch_getPathStat_noEndDirSeparator(fileName,&type,0,&st_mode)) return hpatch_FALSE;
    return 0==chmod(fileName,(mode_t)st_mode|S_IXUSR|S_IXGRP|S_IXOTH);
#endif
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rcx
movq $0x0, (%rcx)
xorl %r14d, %r14d
leaq 0x14(%rsp), %rsi
xorl %edx, %edx
callq 0x47665
testl %eax, %eax
je 0x47c1e
movl 0x8(%rsp), %esi
orl $0x49, %esi
movq %rbx, %rdi
callq 0x42d0
xorl %r14d, %r14d
testl %eax, %eax
sete %r14b
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: import_fileRead
hpatch_BOOL _import_fileRead(hpatch_FileHandle file,TByte* buf,TByte* buf_end){
    while (buf<buf_end) {
        size_t readLen=(size_t)(buf_end-buf);
        if (readLen>hpatch_kFileIOBestMaxSize) readLen=hpatch_kFileIOBestMaxSize;
        if (readLen!=fread(buf,1,readLen,file)) return hpatch_FALSE;
        buf+=readLen;
    }
    return buf==buf_end;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x100000, %r13d        # imm = 0x100000
cmpq %rbx, %r14
jae 0x47c72
movq %rbx, %r12
subq %r14, %r12
cmpq %r13, %r12
cmovaeq %r13, %r12
movl $0x1, %esi
movq %r14, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x44a0
addq %r12, %r14
cmpq %rax, %r12
je 0x47c41
xorl %eax, %eax
jmp 0x47c78
sete %al
movzbl %al, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: import_fileWrite
hpatch_BOOL _import_fileWrite(hpatch_FileHandle file,const TByte* data,const TByte* data_end){
    while (data<data_end) {
        size_t writeLen=(size_t)(data_end-data);
        if (writeLen>hpatch_kFileIOBestMaxSize) writeLen=hpatch_kFileIOBestMaxSize;
        if (writeLen!=fwrite(data,1,writeLen,file)) return hpatch_FALSE;
        data+=writeLen;
    }
    return data==data_end;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x100000, %r13d        # imm = 0x100000
cmpq %rbx, %r14
jae 0x47ccb
movq %rbx, %r12
subq %r14, %r12
cmpq %r13, %r12
cmovaeq %r13, %r12
movl $0x1, %esi
movq %r14, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x4660
addq %r12, %r14
cmpq %rax, %r12
je 0x47c9a
xorl %eax, %eax
jmp 0x47cd1
sete %al
movzbl %al, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: import_fileTruncate
hpatch_BOOL _import_fileTruncate(hpatch_FileHandle file,hpatch_StreamPos_t new_file_length){
#ifdef _MSC_VER
    int fno=_fileno(file);
    if (fno==-1) return hpatch_FALSE;
    if (_chsize_s(fno,new_file_length)!=0) return hpatch_FALSE;
#else
    int fno=fileno(file);
    if (fno==-1) return hpatch_FALSE;
    if (ftruncate(fno,new_file_length)!=0) return hpatch_FALSE;
#endif
    return hpatch_TRUE;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0x4330
cmpl $-0x1, %eax
je 0x47cfe
movl %eax, %edi
movq %rbx, %rsi
callq 0x4170
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
jmp 0x47d00
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: hpatch_TFileStreamInput_open
hpatch_BOOL hpatch_TFileStreamInput_open(hpatch_TFileStreamInput* self,const char* fileName_utf8){
    assert(self->m_file==0);
    self->fileError=hpatch_FALSE;
    if (self->m_file) _ferr_returnv(EINVAL);
    if (!_import_fileOpenRead(fileName_utf8,&self->m_file,&self->base.streamSize))
        _ferr_return();
    
    self->base.streamImport=self;
    self->base.read=_TFileStreamInput_read_file;
    self->m_fpos=0;
    self->m_offset=0;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpq $0x0, 0x20(%rdi)
jne 0x47dad
movq %rdi, %rbx
movl $0x0, 0x38(%rdi)
leaq 0x8(%rdi), %rdx
leaq 0x1a736(%rip), %rax     # 0x6245c
movq %rsi, %rdi
movq %rax, %rsi
callq 0x48729
testq %rax, %rax
je 0x47d57
movq %rax, 0x20(%rbx)
movq %rbx, (%rbx)
leaq 0x88(%rip), %rax        # 0x47dcc
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movl $0x1, %r14d
jmp 0x47d72
callq 0x4050
movl (%rax), %ebp
movl 0x38(%rbx), %eax
cmpl %ebp, %eax
sete %cl
testl %ebp, %ebp
sete %dl
xorl %r14d, %r14d
orb %cl, %dl
je 0x47d7a
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
testl %eax, %eax
jne 0x47d81
movl %ebp, 0x38(%rbx)
movq 0x34240(%rip), %rax     # 0x7bfc8
movq (%rax), %rbx
movl %ebp, %edi
callq 0x40d0
leaq 0x1155d(%rip), %rsi     # 0x592f6
xorl %r14d, %r14d
movq %rbx, %rdi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4450
jmp 0x47d72
leaq 0x1a4ee(%rip), %rdi     # 0x622a2
leaq 0x1a44f(%rip), %rsi     # 0x6220a
leaq 0x1a4f0(%rip), %rcx     # 0x622b2
movl $0x24b, %edx            # imm = 0x24B
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: TFileStreamInput_read_file
static hpatch_BOOL _TFileStreamInput_read_file(const hpatch_TStreamInput* stream,hpatch_StreamPos_t readFromPos,
                                                   TByte* out_data,TByte* out_data_end){
        size_t readLen;
        hpatch_TFileStreamInput* self=(hpatch_TFileStreamInput*)stream->streamImport;
        assert(out_data<=out_data_end);
        readLen=(size_t)(out_data_end-out_data);
        if (readLen==0) return hpatch_TRUE;
        if ((readLen>self->base.streamSize)
            ||(readFromPos>self->base.streamSize-readLen)) _ferr_returnv(EFBIG);
        if (self->m_fpos!=readFromPos+self->m_offset){
            if (!_import_fileSeek64To(self->m_file,readFromPos+self->m_offset)) _rw_ferr_return();
        }
        if (!_import_fileRead(self->m_file,out_data,out_data+readLen)) _rw_ferr_return();
        self->m_fpos=readFromPos+self->m_offset+readLen;
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq %rcx, %rdx
ja 0x47f6b
movq %rcx, %r15
movq %rdx, %r12
movq %rcx, %r14
movl $0x1, %ebx
subq %rdx, %r14
je 0x47f0c
movq %rsi, %rbp
movq (%rdi), %r13
movq 0x8(%r13), %rax
subq %r14, %rax
setb %cl
notb %cl
cmpq %rsi, %rax
setae %al
testb %al, %cl
jne 0x47e46
callq 0x4050
movl $0x1b, (%rax)
movl 0x38(%r13), %eax
xorl %ebx, %ebx
cmpl $0x1b, %eax
je 0x47f0c
testl %eax, %eax
jne 0x47e3c
movl $0x1b, 0x38(%r13)
callq 0x4a4c
jmp 0x47f0c
movq 0x30(%r13), %rsi
addq %rbp, %rsi
cmpq %rsi, 0x28(%r13)
je 0x47e9d
movq 0x20(%r13), %rdi
xorl %ebx, %ebx
xorl %edx, %edx
callq 0x4540
testl %eax, %eax
je 0x47e9d
movq $-0x1, 0x28(%r13)
callq 0x4050
movl (%rax), %r15d
movl 0x38(%r13), %eax
cmpl %r15d, %eax
sete %cl
testl %r15d, %r15d
sete %dl
orb %cl, %dl
jne 0x47f0c
testl %eax, %eax
jne 0x47f3e
movl %r15d, 0x38(%r13)
jmp 0x47f3e
movq %rbp, 0x10(%rsp)
movq %r13, 0x8(%rsp)
movq 0x20(%r13), %rbx
movl $0x100000, %ebp         # imm = 0x100000
cmpq %r15, %r12
jae 0x47edf
movq %r15, %r13
subq %r12, %r13
cmpq %rbp, %r13
cmovaeq %rbp, %r13
movl $0x1, %esi
movq %r12, %rdi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x44a0
addq %r13, %r12
cmpq %rax, %r13
je 0x47eb0
jmp 0x47ee1
je 0x47f1d
movq 0x8(%rsp), %r14
movq $-0x1, 0x28(%r14)
callq 0x4050
movl (%rax), %r15d
movl 0x38(%r14), %eax
cmpl %r15d, %eax
sete %cl
testl %r15d, %r15d
sete %dl
xorl %ebx, %ebx
orb %cl, %dl
je 0x47f36
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq 0x10(%rsp), %r14
movq 0x8(%rsp), %rax
addq 0x30(%rax), %r14
movq %r14, 0x28(%rax)
movl $0x1, %ebx
jmp 0x47f0c
testl %eax, %eax
jne 0x47f3e
movl %r15d, 0x38(%r14)
movq 0x34083(%rip), %rax     # 0x7bfc8
movq (%rax), %r14
movl %r15d, %edi
callq 0x40d0
leaq 0x1139f(%rip), %rsi     # 0x592f6
xorl %ebx, %ebx
movq %r14, %rdi
movl %r15d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4450
jmp 0x47f0c
leaq 0x1a4ed(%rip), %rdi     # 0x6245f
leaq 0x1a291(%rip), %rsi     # 0x6220a
leaq 0x1a4f6(%rip), %rcx     # 0x62476
movl $0x23d, %edx            # imm = 0x23D
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: hpatch_TFileStreamInput_setOffset
hpatch_BOOL hpatch_TFileStreamInput_setOffset(hpatch_TFileStreamInput* self,hpatch_StreamPos_t offset){
    if (self->base.streamSize<offset)
        _ferr_returnv(EFBIG);
    self->m_offset+=offset;
    self->base.streamSize-=offset;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
subq %rsi, %rax
jae 0x47fc0
callq 0x4050
movl $0x1b, (%rax)
movl 0x38(%rbx), %eax
xorl %ebp, %ebp
cmpl $0x1b, %eax
je 0x47fcd
testl %eax, %eax
jne 0x47fb9
movl $0x1b, 0x38(%rbx)
callq 0x4a7f
jmp 0x47fcd
addq %rsi, 0x30(%rbx)
movq %rax, 0x8(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/file_for_patch.c
// Function: hpatch_TFileStreamOutput_open
hpatch_BOOL hpatch_TFileStreamOutput_open(hpatch_TFileStreamOutput* self,const char* fileName_utf8,
                                          hpatch_StreamPos_t max_file_length){
    assert(self->m_file==0);
    self->fileError=hpatch_FALSE;
    if (self->m_file) _ferr_returnv(EINVAL);
    if (!_import_fileOpenCreateOrReWrite(fileName_utf8,&self->m_file))
        _ferr_return();
    
    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=0;
    self->m_offset=0;
    self->is_in_readModel=hpatch_FALSE;
    self->is_random_out=hpatch_FALSE;
    self->out_length=0;
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpq $0x0, 0x20(%rdi)
jne 0x48118
movq %rdx, %r14
movq %rdi, %rbx
movl $0x0, 0x38(%rdi)
leaq 0x1a469(%rip), %rax     # 0x624e1
movq %rsi, %rdi
movq %rax, %rsi
callq 0x4340
testq %rax, %rax
je 0x480c2
movq %rax, 0x20(%rbx)
movq %rbx, (%rbx)
movq %r14, 0x8(%rbx)
leaq 0x9d(%rip), %rax        # 0x48137
movq %rax, 0x10(%rbx)
leaq 0x14d(%rip), %rax       # 0x481f2
movq %rax, 0x18(%rbx)
xorl %eax, %eax
movq %rax, 0x3c(%rbx)
movq %rax, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movl $0x1, %r14d
jmp 0x480dd
callq 0x4050
movl (%rax), %ebp
movl 0x38(%rbx), %eax
cmpl %ebp, %eax
sete %cl
testl %ebp, %ebp
sete %dl
xorl %r14d, %r14d
orb %cl, %dl
je 0x480e5
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
testl %eax, %eax
jne 0x480ec
movl %ebp, 0x38(%rbx)
movq 0x33ed5(%rip), %rax     # 0x7bfc8
movq (%rax), %rbx
movl %ebp, %edi
callq 0x40d0
leaq 0x111f2(%rip), %rsi     # 0x592f6
xorl %r14d, %r14d
movq %rbx, %rdi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4450
jmp 0x480dd
leaq 0x1a183(%rip), %rdi     # 0x622a2
leaq 0x1a0e4(%rip), %rsi     # 0x6220a
leaq 0x1a1d7(%rip), %rcx     # 0x62304
movl $0x291, %edx            # imm = 0x291
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/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 0x48172
movq %rbx, %rdi
callq 0x4863c
testl %eax, %eax
je 0x48191
movl $0x1, 0x40(%rbx)
movq $-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 0x47dcc
movq $-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 0x481c2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %eax, %eax
jne 0x481c9
movl %ebp, 0x38(%rbx)
movq 0x33df8(%rip), %rax     # 0x7bfc8
movq (%rax), %rbx
movl %ebp, %edi
callq 0x40d0
leaq 0x11115(%rip), %rsi     # 0x592f6
movq %rbx, %rdi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4450
jmp 0x481b1
// File: /workspace/github_cpp_makefile_star2_O3/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 0x485ad
movq %rdx, %r14
movq %rdi, %rbx
movl $0x0, 0x38(%rdi)
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x1a0fb(%rip), %rax     # 0x62580
movq %rsi, %rdi
movq %rax, %rsi
callq 0x48729
testq %rax, %rax
je 0x484c9
movq %rax, %r15
movq 0x8(%rsp), %r12
movq %rax, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x4540
testl %eax, %eax
je 0x484fc
callq 0x4050
movq %rax, %r14
movl (%rax), %ebp
movq %r15, %rdi
callq 0x42e0
testl %ebp, %ebp
je 0x484d1
movl %ebp, (%r14)
jmp 0x484d1
callq 0x4050
movq %rax, %r14
movl (%r14), %r14d
movl 0x38(%rbx), %eax
cmpl %r14d, %eax
sete %cl
testl %r14d, %r14d
sete %dl
xorl %ebp, %ebp
orb %cl, %dl
je 0x48575
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, 0x20(%rbx)
cmpq %r14, %r12
jbe 0x4853c
movq $0x0, 0x20(%rbx)
movq %r15, %rdi
callq 0x42e0
callq 0x4050
movl $0x1b, (%rax)
movl 0x38(%rbx), %eax
xorl %ebp, %ebp
cmpl $0x1b, %eax
je 0x484ed
testl %eax, %eax
jne 0x48535
movl $0x1b, 0x38(%rbx)
callq 0x4b18
jmp 0x484ed
movq %rbx, (%rbx)
movq %r14, 0x8(%rbx)
leaq -0x413(%rip), %rax      # 0x48137
movq %rax, 0x10(%rbx)
leaq -0x363(%rip), %rax      # 0x481f2
movq %rax, 0x18(%rbx)
movq %r12, 0x28(%rbx)
xorl %eax, %eax
movq %rax, 0x30(%rbx)
movq %rax, 0x3c(%rbx)
movq %r12, 0x48(%rbx)
movl $0x1, %ebp
jmp 0x484ed
testl %eax, %eax
jne 0x4857d
movl %r14d, 0x38(%rbx)
movq 0x33a44(%rip), %rax     # 0x7bfc8
movq (%rax), %rbx
movl %r14d, %edi
callq 0x40d0
leaq 0x10d60(%rip), %rsi     # 0x592f6
xorl %ebp, %ebp
movq %rbx, %rdi
movl %r14d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x4450
jmp 0x484ed
leaq 0x19cee(%rip), %rdi     # 0x622a2
leaq 0x19c4f(%rip), %rsi     # 0x6220a
leaq 0x19daa(%rip), %rcx     # 0x6236c
movl $0x2a5, %edx            # imm = 0x2A5
callq 0x4200
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4340
movq %rax, %rbx
testq %r14, %r14
sete %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x48765
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x4540
testl %eax, %eax
je 0x48770
movq %rbx, %rdi
callq 0x42e0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x44b0
movq %rax, (%r14)
testq %rax, %rax
js 0x4875b
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4540
testl %eax, %eax
jne 0x4875b
jmp 0x48765
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
testl %edi, %edi
jle 0x488a4
movl %r8d, %ebx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
leal (%r12,%rbx), %eax
decl %eax
movl %eax, 0x4(%rsp)
testl %ebp, %ebp
sete %al
cmpl $0x1, %r12d
setne %cl
orb %al, %cl
jne 0x4886d
movl 0x4(%rsp), %edi
movq %r14, %rsi
callq *%r15
jmp 0x4889d
movq %r15, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movq %r14, 0x20(%rsp)
leaq 0x8(%rsp), %r13
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
callq 0x488c8
movq %r13, %rdi
callq 0x45d0
cmpq $0x0, 0x8(%rsp)
jne 0x488c3
incl %ebx
decl %r12d
jne 0x48851
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x8(%rsp)
jne 0x488c3
movq %rax, %rdi
callq 0x45e0
callq 0x40b0
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
callq 0x48b76
leaq 0x8(%rsp), %r14
leaq 0x18(%rsp), %r15
movq (%rbx), %rax
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
testq %rax, %rax
je 0x48ae6
movq %rax, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
movq %r15, %rdi
callq 0x2095c
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq %rax, 0x8(%rsp)
movb 0x10(%rsp), %al
movb %al, 0x20(%rsp)
movb $0x1, 0x10(%rsp)
movq %r15, %rdi
callq 0x20946
movq 0x70(%rbx), %r12
movq %r14, %rdi
callq 0x20946
testq %r12, %r12
je 0x48afe
callq 0x48822
jmp 0x48a95
movq (%rbx), %rdi
callq 0x487b3
movq 0x48(%rbx), %rax
cmpq 0x28(%rbx), %rax
jne 0x48b3a
movq 0x10(%rbx), %rdi
callq 0x487f6
movq 0x8(%rbx), %rdi
callq 0x487f6
addq $0x18, %rbx
movq %rbx, %rdi
callq 0x4918e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x19a87(%rip), %rdi     # 0x625c8
leaq 0x19a92(%rip), %rsi     # 0x625da
leaq 0x19ab7(%rip), %rcx     # 0x62606
movl $0x34, %edx
callq 0x4200
jmp 0x48b6a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20946
jmp 0x48b6d
movq %rax, %rbx
movq %rbx, %rdi
callq 0x9b7c
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x20, %rsp
cmpb $0x0, 0x78(%rdi)
jne 0x48bf2
movq %rdi, %rbx
movq (%rdi), %rax
movq $0x0, (%rsp)
movb $0x0, 0x8(%rsp)
testq %rax, %rax
je 0x48bce
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x2095c
leaq 0x10(%rsp), %rdi
movq (%rdi), %rax
movq (%rsp), %rcx
movq %rcx, (%rdi)
movq %rax, (%rsp)
movb 0x8(%rsp), %al
movb %al, 0x8(%rdi)
movb $0x1, 0x8(%rsp)
callq 0x20946
cmpb $0x0, 0x78(%rbx)
jne 0x48bea
movb $0x1, 0x78(%rbx)
movq 0x8(%rbx), %rdi
callq 0x4881d
movq 0x10(%rbx), %rdi
callq 0x4881d
movq %rsp, %rdi
callq 0x20946
addq $0x20, %rsp
popq %rbx
retq
jmp 0x48bfa
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20946
movq %rbx, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
subq $0x28, %rsp
movq 0x68(%rdi), %rax
testq %rax, %rax
js 0x48cfc
je 0x48d01
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rax
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
testq %rax, %rax
je 0x48c7d
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x2095c
leaq 0x18(%rsp), %rdi
movq (%rdi), %rax
movq 0x8(%rsp), %rcx
movq %rcx, (%rdi)
movq %rax, 0x8(%rsp)
movb 0x10(%rsp), %al
movb %al, 0x8(%rdi)
movb $0x1, 0x10(%rsp)
callq 0x20946
cmpb $0x0, 0x78(%r14)
jne 0x48cee
xorb $0x1, %bl
leaq 0x8(%rsp), %r15
movq 0x60(%r14), %rax
movq %rax, %rcx
subq 0x40(%r14), %rcx
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
shlq $0x6, %rcx
movq 0x38(%r14), %rax
movq 0x48(%r14), %rdx
subq 0x50(%r14), %rdx
sarq $0x3, %rdx
subq 0x28(%r14), %rax
sarq $0x3, %rax
addq %rdx, %rax
addq %rcx, %rax
cmpq 0x68(%r14), %rax
setb %bpl
movl %ebp, %eax
orb %bl, %al
jne 0x48cf0
incq 0x70(%r14)
movq 0x8(%r14), %rdi
movq %r15, %rsi
callq 0x48813
decq 0x70(%r14)
cmpb $0x0, 0x78(%r14)
je 0x48c8c
xorl %ebp, %ebp
leaq 0x8(%rsp), %rdi
callq 0x20946
jmp 0x48d03
movb $0x1, %bpl
jmp 0x48d03
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x48d12
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20946
movq %rbx, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/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 $0x28, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
testq %rax, %rax
je 0x48f90
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
callq 0x2095c
leaq 0x18(%rsp), %rdi
movq (%rdi), %rax
movq 0x8(%rsp), %rcx
movq %rcx, (%rdi)
movq %rax, 0x8(%rsp)
movb 0x10(%rsp), %al
movb %al, 0x8(%rdi)
movb $0x1, 0x10(%rsp)
callq 0x20946
movq 0x28(%rbx), %rax
cmpq %rax, 0x48(%rbx)
jne 0x48fcc
xorb $0x1, %bpl
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
movb 0x78(%rbx), %al
orb %bpl, %al
jne 0x48fe7
incq 0x70(%rbx)
movq 0x10(%rbx), %rdi
movq %r15, %rsi
callq 0x48813
decq 0x70(%rbx)
movq 0x28(%rbx), %rax
cmpq %rax, 0x48(%rbx)
je 0x48fa6
leaq 0x18(%rbx), %rdi
movq (%rax), %r14
callq 0x493fa
cmpb $0x0, 0x78(%rbx)
jne 0x48fe7
movq 0x8(%rbx), %rdi
callq 0x48818
leaq 0x8(%rsp), %rdi
callq 0x20946
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x49003
jmp 0x49003
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20946
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/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 0x49853
movq %rdx, %rcx
movabsq $0xf00e10d2fc5cd, %rdx  # imm = 0xF00E10D2FC5CD
movq %rcx, %rax
mulq %rdx
movq %rcx, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0xf, %rax
imulq $0xfff1, %rax, %rax     # imm = 0xFFF1
subq %rax, %rcx
movl $0xffff, %eax           # imm = 0xFFFF
movq %rdi, %rdx
andq %rax, %rdx
movq %rcx, %r8
imulq %rdx, %r8
movl $0x80078071, %r9d       # imm = 0x80078071
imulq %r8, %r9
shrq $0x2f, %r9
imull $0xfff1, %r9d, %r9d     # imm = 0xFFF1
subl %r9d, %r8d
andq %rsi, %rax
leaq (%rdx,%rax), %r9
addl $0xfff0, %r9d           # imm = 0xFFF0
shrl $0x10, %edi
shrl $0x10, %esi
addq %rdi, %rsi
subq %rcx, %rsi
addq %r8, %rsi
movl $0xfff1, %ecx           # imm = 0xFFF1
leaq (%rsi,%rcx), %rdi
cmpl $0xfff1, %r9d           # imm = 0xFFF1
leaq -0x1(%rdx,%rax), %rax
movl $0xfff0, %edx           # imm = 0xFFF0
cmovaeq %rax, %rdx
movq $-0xfff1, %rax          # imm = 0xFFFF000F
leaq (%rdx,%rax), %r8
cmpq %rcx, %rdx
cmovbq %rdx, %r8
addq %rax, %rsi
cmpq $0x1ffe2, %rdi          # imm = 0x1FFE2
cmovbq %rdi, %rsi
movq %rsi, %rdx
shlq $0x10, %rdx
movabsq $-0xfff10000, %rax      # imm = 0xFFFFFFFF000F0000
addq %rdx, %rax
cmpq %rcx, %rsi
cmovbq %rdx, %rax
orq %r8, %rax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r13
movq (%rsi), %r12
xorl %ebp, %ebp
movq %rbp, (%rsi)
leaq 0x8(%rsp), %rdi
movq %rbp, 0x50(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rdi)
leaq 0xf9fa(%rip), %rdx      # 0x59293
movl %r8d, %esi
movl $0x70, %ecx
callq 0x49e70
testl %eax, %eax
jne 0x49935
movq %r15, %rax
leaq 0x8(%rsp), %r15
movq %r13, 0x18(%r15)
movl %ebp, 0x20(%r15)
movq %rax, (%r15)
movl %ebp, 0x8(%r15)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testl %ebp, %ebp
jne 0x498e2
cmpq %r13, %r12
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovbq %r12, %rax
movl %eax, 0x28(%rsp)
subq %rax, %r12
cmpl $0x0, 0x10(%rsp)
jne 0x498fc
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 0x4ab03
testl %eax, %eax
jne 0x4991a
movl 0x28(%rsp), %ebp
jmp 0x498cb
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
movq 0x28(%rdi), %rax
movq %rax, (%rbx)
callq 0x4a16a
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_O3/sisong[P]ApkDiffPatch/zlib1.3.1/crc32.c
// Function: crc32_combine64
uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) {
#ifdef DYNAMIC_CRC_TABLE
    once(&made, make_crc_table);
#endif /* DYNAMIC_CRC_TABLE */
    return multmodp(x2nmodp(len2, 3), crc1) ^ (crc2 & 0xffffffff);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
callq 0x49d9f
xorl %ecx, %ecx
movl $0x80000000, %edx       # imm = 0x80000000
testl %eax, %edx
je 0x49d75
xorl %r14d, %ecx
leal -0x1(%rdx), %esi
testl %eax, %esi
je 0x49d90
shrl %edx
movl %r14d, %esi
shrl %esi
movl %esi, %edi
xorl $0xedb88320, %edi       # imm = 0xEDB88320
testb $0x1, %r14b
cmovel %esi, %edi
movl %edi, %r14d
jmp 0x49d67
movl %ecx, %ecx
movl %ebx, %eax
xorq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
testq %rdi, %rdi
je 0x49e14
movl $0x3, %ecx
movl $0x80000000, %esi       # imm = 0x80000000
leaq 0x1aceb(%rip), %rdx     # 0x64aa0
testb $0x1, %dil
jne 0x49dd2
movl %esi, %eax
movq %rdi, %r8
sarq %r8
incl %ecx
movl %eax, %esi
cmpq $0x1, %rdi
movq %r8, %rdi
ja 0x49db5
jmp 0x49e13
movl %ecx, %eax
andl $0x1f, %eax
movl (%rdx,%rax,4), %r8d
xorl %eax, %eax
movl $0x80000000, %r9d       # imm = 0x80000000
testl %r8d, %r9d
je 0x49df3
xorl %esi, %eax
leal -0x1(%r9), %r10d
testl %r8d, %r10d
je 0x49dbd
shrl %r9d
movl %esi, %r10d
shrl %r10d
movl %r10d, %r11d
xorl $0xedb88320, %r11d      # imm = 0xEDB88320
testb $0x1, %sil
cmovel %r10d, %r11d
movl %r11d, %esi
jmp 0x49de3
retq
movl $0x80000000, %eax       # imm = 0x80000000
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a4de
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testl %ecx, %ecx
jne 0x4a204
movq 0x38(%rbx), %rsi
movl 0x8(%rsi), %ebp
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x4a1a2
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x78(%rsi), %rax
testq %rax, %rax
je 0x4a1b9
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x70(%rsi), %rax
testq %rax, %rax
je 0x4a1d0
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x60(%rsi), %rax
testq %rax, %rax
je 0x4a1e7
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x50(%rbx), %rdi
callq *0x48(%rbx)
movq $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_O3/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:
movl $0x1, %eax
testq %rdi, %rdi
je 0x4a504
cmpq $0x0, 0x40(%rdi)
je 0x4a504
cmpq $0x0, 0x48(%rdi)
je 0x4a504
movq 0x38(%rdi), %rcx
testq %rcx, %rcx
je 0x4a504
cmpq %rdi, (%rcx)
je 0x4a505
retq
movl 0x8(%rcx), %ecx
leal -0x39(%rcx), %edx
cmpl $0x38, %edx
ja 0x4a523
movabsq $0x100400400011001, %rsi # imm = 0x100400400011001
btq %rdx, %rsi
jae 0x4a523
xorl %eax, %eax
retq
cmpl $0x29a, %ecx            # imm = 0x29A
je 0x4a520
cmpl $0x2a, %ecx
jne 0x4a504
jmp 0x4a520
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a4de
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testl %ecx, %ecx
jne 0x4a7e2
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 0x4a7d9
testl %ebp, %ebp
je 0x4a7d9
addq 0x60(%rax), %rsi
addq %rcx, %rsi
movl %ebp, %edx
subq %rdx, %rsi
movq %r14, %rdi
callq 0x4290
xorl %eax, %eax
testq %rbx, %rbx
je 0x4a7e2
movl %ebp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a4de
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testl %ecx, %ecx
jne 0x4a8f4
testq %r15, %r15
je 0x4a8e1
movq 0x38(%r14), %rax
movl 0x28(%rax), %eax
movl %eax, (%r15)
xorl %eax, %eax
testq %rbx, %rbx
je 0x4a8f4
movq 0x38(%r14), %rcx
movl 0x1734(%rcx), %ecx
movl %ecx, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0x4a4de
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testl %ecx, %ecx
jne 0x4a986
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
cmpl $0x10, %ebp
ja 0x4a986
movq 0x38(%r14), %r14
movq 0x20(%r14), %rcx
addq $0x2, %rcx
cmpq %rcx, 0x1700(%r14)
jb 0x4a986
movl 0x1734(%r14), %eax
movl $0x10, %r15d
subl %eax, %r15d
cmpl %ebp, %r15d
cmovgel %ebp, %r15d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
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 0x514c6
movl %r15d, %ecx
sarl %cl, %ebx
subl %r15d, %ebp
jne 0x4a937
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
callq 0x4a4de
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
testl %eax, %eax
jne 0x4aaf8
cmpl $-0x1, %r14d
movl $0x6, %r12d
cmovnel %r14d, %r12d
cmpl $0xa, %r12d
setae %al
cmpl $0x5, %ebx
setae %cl
orb %al, %cl
jne 0x4aaf8
movq 0x38(%r15), %r14
cmpl %ebx, 0xc8(%r14)
jne 0x4aa08
movslq 0xc4(%r14), %rax
shlq $0x4, %rax
leaq 0x3124b(%rip), %rcx     # 0x7bc40
movq 0x8(%rax,%rcx), %rax
movl %r12d, %edx
shlq $0x4, %rdx
cmpq 0x8(%rdx,%rcx), %rax
je 0x4aa0f
cmpl $-0x2, 0x4c(%r14)
jne 0x4aa41
movl 0xc4(%r14), %eax
cmpl %r12d, %eax
je 0x4aaef
testl %eax, %eax
jne 0x4aaab
movl 0x1728(%r14), %eax
testl %eax, %eax
je 0x4aaab
cmpl $0x1, %eax
jne 0x4aa83
movq %r14, %rdi
callq 0x4b5f6
jmp 0x4aaa0
movq %r15, %rdi
movl $0x5, %esi
callq 0x4ab03
cmpl $-0x2, %eax
je 0x4aaf8
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
cmpl $0x0, 0x8(%r15)
jne 0x4aaf8
movl 0xac(%r14), %eax
movl 0xb4(%r14), %ecx
subq 0x98(%r14), %rax
addq %rax, %rcx
je 0x4aa0f
jmp 0x4aaf8
movq 0x78(%r14), %rdi
movl 0x84(%r14), %edx
decl %edx
movw $0x0, (%rdi,%rdx,2)
addq %rdx, %rdx
xorl %esi, %esi
callq 0x41c0
movl $0x0, 0x1728(%r14)
movl %r12d, 0xc4(%r14)
movl %r12d, %eax
shlq $0x4, %rax
leaq 0x31180(%rip), %rcx     # 0x7bc40
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)
movl %ebx, 0xc8(%r14)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4a4de
movl %eax, %ecx
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testl %ecx, %ecx
jne 0x4b68f
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