LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: check_diff(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*)
bool check_diff(const TByte* newData,const TByte* newData_end,
                const TByte* oldData,const TByte* oldData_end,
                const TByte* diff,const TByte* diff_end){
    hpatch_TStreamInput  newStream;
    hpatch_TStreamInput  oldStream;
    hpatch_TStreamInput  diffStream;
    mem_as_hStreamInput(&newStream,newData,newData_end);
    mem_as_hStreamInput(&oldStream,oldData,oldData_end);
    mem_as_hStreamInput(&diffStream,diff,diff_end);
    return check_diff(&newStream,&oldStream,&diffStream);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rdx
movq %rdi, %rsi
leaq 0x48(%rsp), %r13
movq %r13, %rdi
callq 0x433a9
leaq 0x28(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x433a9
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x433a9
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0xf7ea
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: check_diff(hpatch_TStreamInput const*, hpatch_TStreamInput const*, hpatch_TStreamInput const*)
bool check_diff(const hpatch_TStreamInput*  newData,
                const hpatch_TStreamInput*  oldData,
                const hpatch_TStreamInput*  diff){
    const size_t kACacheBufSize=hdiff_kFileIOBufBestSize;
    TAutoMem _cache(kACacheBufSize*(1+8));
    _TCheckOutNewDataStream out_newData(newData,_cache.data(),kACacheBufSize);
    _test_rt(patch_stream_with_cache(&out_newData,oldData,diff,
                                     _cache.data()+kACacheBufSize,_cache.data_end()));
    _test_rt(out_newData.isWriteFinish());
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x480000, %edi         # imm = 0x480000
callq 0x4400
testq %rax, %rax
je 0xf881
movq %rax, %rbx
movq %rsp, %rdi
movl $0x80000, %ecx          # imm = 0x80000
movq %r12, %rsi
movq %rax, %rdx
callq 0x25d8e
leaq 0x480000(%rbx), %r8
movq %rbx, %rcx
addq $0x80000, %rcx          # imm = 0x80000
movq %rsp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x448ac
testl %eax, %eax
je 0xf871
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movb $0x1, %bpl
cmpq 0x8(%rax), %rcx
jne 0xf878
movq %rbx, %rdi
callq 0x43b0
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x472c
jmp 0xf87d
callq 0x470a
xorl %ebp, %ebp
jmp 0xf85a
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x4ca7a(%rip), %rsi     # 0x5c30f
movq %rax, %rdi
callq 0x4110
movq 0x6c744(%rip), %rsi     # 0x7bfe8
movq 0x6c70d(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
jmp 0xf8cb
movq %rax, %r14
movq %rbx, %rdi
callq 0x43b0
movq %r14, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: check_compressed_diff(hpatch_TStreamInput const*, hpatch_TStreamInput const*, hpatch_TStreamInput const*, hpatch_TDecompress*)
bool check_compressed_diff(const hpatch_TStreamInput*  newData,
                           const hpatch_TStreamInput*  oldData,
                           const hpatch_TStreamInput*  compressed_diff,
                           hpatch_TDecompress* decompressPlugin){
    const size_t kACacheBufSize=hdiff_kFileIOBufBestSize;
    TAutoMem _cache(kACacheBufSize*(1+6));
    _TCheckOutNewDataStream out_newData(newData,_cache.data(),kACacheBufSize);
    _test_rt(patch_decompress_with_cache(&out_newData,oldData,compressed_diff,decompressPlugin,
                                         _cache.data()+kACacheBufSize,_cache.data_end()));
    _test_rt(out_newData.isWriteFinish());
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl $0x380000, %edi         # imm = 0x380000
callq 0x4400
testq %rax, %rax
je 0xf9f0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movl $0x80000, %ecx          # imm = 0x80000
movq %r13, %rsi
movq %rax, %rdx
callq 0x25d8e
leaq 0x380000(%rbx), %r9
movq %rbx, %r8
addq $0x80000, %r8           # imm = 0x80000
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x45626
testl %eax, %eax
je 0xf9e0
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
movb $0x1, %bpl
cmpq 0x8(%rax), %rcx
jne 0xf9e7
movq %rbx, %rdi
callq 0x43b0
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4770
jmp 0xf9ec
callq 0x474e
xorl %ebp, %ebp
jmp 0xf9c7
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x4c90b(%rip), %rsi     # 0x5c30f
movq %rax, %rdi
callq 0x4110
movq 0x6c5d5(%rip), %rsi     # 0x7bfe8
movq 0x6c59e(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
jmp 0xfa3a
movq %rax, %r14
movq %rbx, %rdi
callq 0x43b0
movq %r14, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: check_single_compressed_diff(hpatch_TStreamInput const*, hpatch_TStreamInput const*, hpatch_TStreamInput const*, hpatch_TDecompress*)
bool check_single_compressed_diff(const hpatch_TStreamInput* newData,
                                  const hpatch_TStreamInput* oldData,
                                  const hpatch_TStreamInput* diff,
                                  hpatch_TDecompress* decompressPlugin){
    sspatch_listener_t listener={0};
    listener.import=decompressPlugin;
    listener.onDiffInfo=_check_single_onDiffInfo;
    listener.onPatchFinish=_check_single_onPatchFinish;
        
    const size_t kACacheBufSize=hdiff_kFileIOBufBestSize;
    TAutoMem _cache(kACacheBufSize*1);
    _TCheckOutNewDataStream out_newData(newData,_cache.data(),kACacheBufSize);

    _test_rt(patch_single_stream(&listener,&out_newData,oldData,diff,0,0));
    _test_rt(out_newData.isWriteFinish());
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, 0x8(%rsp)
leaq 0x121(%rip), %rax       # 0xfbfc
movq %rax, 0x10(%rsp)
leaq 0x174(%rip), %rax       # 0xfc5b
movq %rax, 0x18(%rsp)
movl $0x80000, %edi          # imm = 0x80000
callq 0x4400
testq %rax, %rax
je 0xfb6c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
movl $0x80000, %ecx          # imm = 0x80000
movq %r12, %rsi
movq %rax, %rdx
callq 0x25d8e
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x46ae2
testl %eax, %eax
je 0xfb5c
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
movb $0x1, %bpl
cmpq 0x8(%rax), %rcx
jne 0xfb63
movq %rbx, %rdi
callq 0x43b0
movl %ebp, %eax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x47b6
jmp 0xfb68
callq 0x4794
xorl %ebp, %ebp
jmp 0xfb45
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x4c78f(%rip), %rsi     # 0x5c30f
movq %rax, %rdi
callq 0x4110
movq 0x6c459(%rip), %rsi     # 0x7bfe8
movq 0x6c422(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
jmp 0xfbb6
movq %rax, %r14
movq %rbx, %rdi
callq 0x43b0
movq %r14, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: check_single_onDiffInfo(sspatch_listener_t*, hpatch_singleCompressedDiffInfo const*, hpatch_TDecompress**, unsigned char**, unsigned char**)
static hpatch_BOOL _check_single_onDiffInfo(struct sspatch_listener_t* listener,
                                                const hpatch_singleCompressedDiffInfo* info,
                                                hpatch_TDecompress** out_decompressPlugin,
                                                unsigned char** out_temp_cache,
                                                unsigned char** out_temp_cacheEnd){
        size_t memSize=(size_t)(info->stepMemSize+hdiff_kFileIOBufBestSize*3);
        *out_temp_cache=(unsigned char*)malloc(memSize);
        *out_temp_cacheEnd=(*out_temp_cache)+memSize;   
        *out_decompressPlugin=(info->compressType[0]=='\0')?0:(hpatch_TDecompress*)listener->import;
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r14
movq 0x30(%rsi), %rbp
leaq 0x180000(%rbp), %rdi
callq 0x4400
movq %rax, (%r12)
addq %rbp, %rax
addq $0x180000, %rax         # imm = 0x180000
movq %rax, (%r15)
cmpb $0x0, 0x38(%r13)
je 0xfc42
movq (%r14), %rax
jmp 0xfc44
xorl %eax, %eax
movq %rax, (%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: _hdiff_private__create_compressed_diff(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>&, hdiff_TCompress const*, int, hdiff_private::TSuffixString const*)
void __hdiff_private__create_compressed_diff(const TByte* newData,const TByte* newData_end,
                                             const TByte* oldData,const TByte* oldData_end,
                                             std::vector<TByte>& out_diff,
                                             const hdiff_TCompress* compressPlugin,int kMinSingleMatchScore,
                                             const TSuffixString* sstring){
    TDiffData diff;
    std::vector<TOldCover> covers;
    get_diff(newData,newData_end,oldData,oldData_end,diff,covers,
             kMinSingleMatchScore,false,0,sstring,1);
    serialize_compressed_diff(diff,covers,out_diff,compressPlugin);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbx
movq %r8, %r14
movl 0x50(%rsp), %eax
movq 0x58(%rsp), %r10
xorl %r11d, %r11d
movq %rsp, %r9
movq %r11, 0x10(%r9)
xorps %xmm0, %xmm0
movaps %xmm0, (%r9)
leaq 0x18(%rsp), %r8
pushq $0x1
pushq $0x1
pushq %r10
pushq %r11
pushq $0x0
pushq %rax
callq 0xd8b0
addq $0x30, %rsp
leaq 0x18(%rsp), %rdi
movq %rsp, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0xe554
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xfcd2
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xfcf3
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: get_match_covers_by_block(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, hpatch_TOutputCovers*, unsigned long, unsigned long)
void get_match_covers_by_block(const unsigned char* newData,const unsigned char* newData_end,
                               const unsigned char* oldData,const unsigned char* oldData_end,
                               hpatch_TOutputCovers* out_covers,size_t kMatchBlockSize,size_t threadNum){
    hdiff_TStreamInput oldData_stream;
    mem_as_hStreamInput(&oldData_stream,oldData,oldData_end);
    hdiff_TStreamInput newData_stream;
    mem_as_hStreamInput(&newData_stream,newData,newData_end);
    hdiff_TMTSets_s mtsets={threadNum,threadNum,true,true,false};
    get_match_covers_by_block(&newData_stream,&oldData_stream,out_covers,kMatchBlockSize,&mtsets);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x90(%rsp), %r13
movq %rsp, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x433a9
leaq 0x38(%rsp), %rbp
movq %rbp, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x433a9
leaq 0x20(%rsp), %r8
movq %r13, (%r8)
movq %r13, 0x8(%r8)
movw $0x101, 0x10(%r8)       # imm = 0x101
movb $0x0, 0x12(%r8)
movq %rbp, %rdi
movq %rsp, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0xf6f2
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: get_match_covers_by_sstring(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, std::vector<hpatch_TCover_sz, std::allocator<hpatch_TCover_sz>>&, int, bool, ICoverLinesListener*, unsigned long, bool)
void get_match_covers_by_sstring(const unsigned char* newData,const unsigned char* newData_end,
                                 const unsigned char* oldData,const unsigned char* oldData_end,
                                 std::vector<hpatch_TCover_sz>& out_covers,int kMinSingleMatchScore,
                                 bool isUseBigCacheMatch,ICoverLinesListener* listener,
                                 size_t threadNum,bool isCanExtendCover){
    TDiffData diff;
    std::vector<TOldCover> covers;
    assert(sizeof(TOldCover)==sizeof(hpatch_TCover_sz));
    { std::vector<hpatch_TCover_sz> tmp; tmp.swap(out_covers); }
    get_diff(newData,newData_end,oldData,oldData_end,diff,covers,
             kMinSingleMatchScore,isUseBigCacheMatch,listener,0,threadNum,isCanExtendCover);
    void* pcovers=&covers;
    out_covers.swap(*(std::vector<hpatch_TCover_sz>*)pcovers);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %r14d
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movb 0x88(%rsp), %cl
movq 0x78(%rsp), %r11
movb 0x70(%rsp), %dl
xorl %eax, %eax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq (%r8), %rdi
movq 0x10(%r8), %rsi
movups %xmm0, (%r8)
movq %rax, 0x10(%r8)
testq %rdi, %rdi
je 0xfde0
subq %rdi, %rsi
callq 0x4300
movb 0x70(%rsp), %dl
movb 0x88(%rsp), %cl
movq 0x78(%rsp), %r11
movzbl %cl, %eax
movzbl %dl, %r10d
leaq 0x18(%rsp), %r8
movq %rsp, %r9
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r15, %rcx
pushq %rax
pushq 0x88(%rsp)
pushq $0x0
pushq %r11
pushq %r10
pushq %r14
callq 0xd8b0
addq $0x30, %rsp
movq (%rbx), %rdi
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rsi
movaps (%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rbx)
movq %rdi, (%rsp)
movq %rax, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
testq %rdi, %rdi
je 0xfe4a
subq %rdi, %rsi
callq 0x4300
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0xfe72
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: get_match_covers_by_sstring(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, hpatch_TOutputCovers*, int, bool, ICoverLinesListener*, unsigned long, bool)
void get_match_covers_by_sstring(const unsigned char* newData,const unsigned char* newData_end,
                                 const unsigned char* oldData,const unsigned char* oldData_end,
                                 hpatch_TOutputCovers* out_covers,int kMinSingleMatchScore,
                                 bool isUseBigCacheMatch,ICoverLinesListener* listener,
                                 size_t threadNum,bool isCanExtendCover){
    std::vector<hpatch_TCover_sz> covers;
    get_match_covers_by_sstring(newData,newData_end,oldData,oldData_end,covers,
                                kMinSingleMatchScore,isUseBigCacheMatch,listener,threadNum,isCanExtendCover);
    const hpatch_TCover_sz* pcovers=covers.data();
    for (size_t i=0;i<covers.size();++i,++pcovers){
        if (sizeof(*pcovers)==sizeof(hpatch_TCover)){
            out_covers->push_cover(out_covers,(const hpatch_TCover*)pcovers);
        }else{
            hpatch_TCover cover; 
            cover.oldPos=pcovers->oldPos;
            cover.newPos=pcovers->newPos;
            cover.length=pcovers->length;
            out_covers->push_cover(out_covers,&cover);
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %rbx
movb 0x60(%rsp), %al
movups 0x68(%rsp), %xmm0
movb 0x78(%rsp), %r10b
xorps %xmm1, %xmm1
leaq 0x20(%rsp), %r8
movaps %xmm1, (%r8)
movq $0x0, 0x10(%r8)
movzbl %r10b, %r10d
movl %r10d, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
movzbl %al, %eax
movl %eax, (%rsp)
callq 0xfd76
movq 0x20(%rsp), %r14
movq 0x28(%rsp), %rax
subq %r14, %rax
je 0xff00
sarq $0x3, %rax
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r12
cmpq $0x1, %r12
adcq $0x0, %r12
movq %r14, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq *(%rbx)
addq $0x18, %r15
decq %r12
jne 0xfeef
testq %r14, %r14
je 0xff20
movq 0x30(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4300
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %r14
jmp 0xff39
movq %rax, %rbx
testq %r14, %r14
je 0xff4e
movq 0x30(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: void (anonymous namespace)::_outType<hdiff_TCompress const>(std::vector<unsigned char, std::allocator<unsigned char>>&, hdiff_TCompress const*, char const*)
static void _outType(std::vector<TByte>& out_data,T* compressPlugin,const char* versionType=kHDiffVersionType){
        //type version
        pushCStr(out_data,versionType);
        pushCStr(out_data,"&");
        {//compressType
            const char* compressType="";
            if (compressPlugin)
                compressType=compressPlugin->compressType();
            size_t compressTypeLen=strlen(compressType);
            check(compressTypeLen<=hpatch_kMaxPluginTypeLength);
            check(0==strchr(compressType,'&'));
            pushCStr(out_data,compressType);
        }
        const TByte _cstrEndTag='\0';//c string end tag
        pushBack(out_data,&_cstrEndTag,(&_cstrEndTag)+1);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x4140
leaq (%rax,%r15), %rcx
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x9e38
movq 0x8(%rbx), %rsi
leaq 0x49aa8(%rip), %rdx     # 0x5a3fe
leaq 0x49aa2(%rip), %rcx     # 0x5a3ff
movq %rbx, %rdi
callq 0x9e38
testq %r14, %r14
je 0x10972
callq *(%r14)
movq %rax, %r14
jmp 0x10979
leaq 0x4a300(%rip), %r14     # 0x5ac79
movq %r14, %rdi
callq 0x4140
cmpq $0x104, %rax            # imm = 0x104
jae 0x109d7
movq %rax, %r15
movq %r14, %rdi
movl $0x26, %esi
callq 0x4100
testq %rax, %rax
jne 0x109f5
addq %r14, %r15
movq 0x8(%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rcx
callq 0x9e38
leaq 0x10(%rsp), %rcx
movb $0x0, -0x1(%rcx)
movq 0x8(%rbx), %rsi
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x9e38
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x4ba50(%rip), %rsi     # 0x5c43b
movq %rax, %rdi
callq 0x4110
jmp 0x10a11
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x4ba6c(%rip), %rsi     # 0x5c475
movq %rax, %rdi
callq 0x4110
movq 0x6b5d0(%rip), %rsi     # 0x7bfe8
movq 0x6b599(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
jmp 0x10a29
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: check_lite_diff_open(unsigned char const*, unsigned char const*, hpi_compressType*)
bool check_lite_diff_open(const hpi_byte* lite_diff,const hpi_byte* lite_diff_end,
                          hpi_compressType* out_compress_type){
    TPatchiListener listener;
    listener.diffData_cur=lite_diff;
    listener.diffData_end=lite_diff_end;
    hpi_pos_t saved_newSize;
    hpi_pos_t saved_uncompressSize;
    if (!_try_open_hpatchi_and_inplace(listener,out_compress_type,
                                       &saved_newSize,&saved_uncompressSize)) return false;
    return true;
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
xorl %ecx, %ecx
leaq 0x8(%rsp), %rax
movq %rcx, 0x20(%rax)
movq %rcx, 0x90(%rax)
movq %rdi, 0x30(%rax)
movq %rsi, 0x38(%rax)
leaq 0x4(%rsp), %r8
movq %rsp, %rcx
movq %rax, %rdi
movq %rdx, %rsi
movq %r8, %rdx
callq 0x11785
movl %eax, %ebx
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x11753
movq 0x30(%rsp), %rdi
callq *0x10(%rdi)
movl %ebx, %eax
addq $0xa0, %rsp
popq %rbx
retq
jmp 0x1177d
movq %rax, %rbx
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x11775
movq 0x30(%rsp), %rdi
callq *0x10(%rdi)
movq %rbx, %rdi
callq 0x45e0
movq %rax, %rdi
callq 0x9b7c
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: try_open_hpatchi_and_inplace((anonymous namespace)::TPatchiListener&, hpi_compressType*, unsigned int*, unsigned int*)
static
bool _try_open_hpatchi_and_inplace(TPatchiListener& listener,hpi_compressType* out_compress_type,
                                   hpi_pos_t* out_newSize,hpi_pos_t* out_uncompressSize){
    listener.isInplacePatch=false;
    listener.extraSafeSize=0;
    const hpi_byte* diffData_cur_bck=listener.diffData_cur;
    if (hpatch_lite_open(&listener,listener._read_diff,out_compress_type,out_newSize,out_uncompressSize))
        return true;
    listener.diffData_cur=diffData_cur_bck;//reread diffData from 0 pos
    if (hpatchi_inplace_open(&listener,listener._read_diff,out_compress_type,out_newSize,out_uncompressSize,&listener.extraSafeSize)){
        listener.isInplacePatch=true;
        return true;
    }
    return false;
}

// 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, %rbx
movb $0x0, 0x88(%rdi)
movl $0x0, 0x8c(%rdi)
movq 0x30(%rdi), %r13
leaq 0x2c2(%rip), %rsi       # 0x11a7a
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0xc964
movb $0x1, %bpl
testl %eax, %eax
jne 0x117ff
leaq 0x8c(%rbx), %r9
movq %r13, 0x30(%rbx)
leaq 0x29b(%rip), %rsi       # 0x11a7a
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0xcd59
testl %eax, %eax
je 0x117fd
movb $0x1, 0x88(%rbx)
jmp 0x117ff
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_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::TPatchiListener::_read_diff_dec(void*, unsigned char*, unsigned int*)
static hpi_BOOL _read_diff_dec(hpi_TInputStreamHandle inputStream,hpi_byte* out_data,hpi_size_t* data_size){
        TPatchiListener& self=*(TPatchiListener*)inputStream;
        hpi_size_t r_size=*data_size;
        if (r_size>self.uncompressSize){
            r_size=(hpi_size_t)self.uncompressSize;
            *data_size=(hpi_size_t)self.uncompressSize;
        }
        if (!self.decompressPlugin->decompress_part(self.decompresser,out_data,out_data+r_size))
            return hpi_FALSE;
        self.uncompressSize-=r_size;
        return hpi_TRUE;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdx), %ebp
movl 0x60(%rdi), %eax
cmpl %eax, %ebp
jbe 0x11a53
movl %eax, (%rdx)
movl %eax, %ebp
movq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rax
movl %ebp, %edx
addq %rsi, %rdx
callq *0x18(%rax)
testl %eax, %eax
je 0x11a71
subl %ebp, 0x60(%rbx)
movl $0x1, %eax
jmp 0x11a73
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::TPatchiListener::_write_new(hpatchi_listener_t*, unsigned char const*, unsigned int)
static hpi_BOOL _write_new(struct hpatchi_listener_t* listener,const hpi_byte* data,hpi_size_t data_size){
        TPatchiListener& self=*(TPatchiListener*)listener;
        if (data_size>(size_t)(self.newData_end-self.newData_cur)) 
            return hpi_FALSE;
        if (0!=memcmp(self.newData_cur,data,data_size))
            return hpi_FALSE;
        self.newData_cur+=data_size;
        self.newData_cur_pos+=data_size;
        return hpi_TRUE;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq 0x68(%rdi), %r15
movq 0x70(%rdi), %rax
subq %r15, %rax
xorl %ebp, %ebp
cmpq %r14, %rax
jb 0x11afb
movq %rdi, %rbx
movq %r15, %rdi
movq %r14, %rdx
callq 0x4310
testl %eax, %eax
jne 0x11afb
addq %r14, %r15
movq %r15, 0x68(%rbx)
addq %r14, 0x90(%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::TPatchiListener::_read_old(hpatchi_listener_t*, unsigned int, unsigned char*, unsigned int)
static hpi_BOOL _read_old(struct hpatchi_listener_t* listener,hpi_pos_t read_from_pos,hpi_byte* out_data,hpi_size_t data_size){
        TPatchiListener& self=*(TPatchiListener*)listener;
        size_t dsize=self.oldData_end-self.oldData;
        if ((read_from_pos>dsize)|(data_size>(size_t)(dsize-read_from_pos))) return hpi_FALSE;
        memcpy(out_data,self.oldData+(size_t)read_from_pos,data_size);
        if (self.isInplacePatch){
            if (read_from_pos<self.newData_cur_pos)
                return hpi_FALSE;
        }
        return hpi_TRUE;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %eax
movq %rdi, %rbx
movq 0x78(%rdi), %rsi
movq 0x80(%rdi), %rdi
subq %rsi, %rdi
movl %eax, %r14d
subq %r14, %rdi
setb %r8b
movl %ecx, %eax
cmpq %rax, %rdi
setb %cl
xorl %ebp, %ebp
orb %r8b, %cl
jne 0x11b5d
addq %r14, %rsi
movq %rdx, %rdi
movq %rax, %rdx
callq 0x4290
cmpb $0x1, 0x88(%rbx)
jne 0x11b58
cmpq %r14, 0x90(%rbx)
ja 0x11b5d
movl $0x1, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: hdiff_streamDataIsEqual
hpatch_BOOL hdiff_streamDataIsEqual(const hpatch_TStreamInput* x,const hpatch_TStreamInput* y){
    const hpatch_StreamPos_t ssize=x->streamSize;
    if (ssize!=y->streamSize) return hpatch_FALSE;
    const size_t kACacheBufSize=hdiff_kFileIOBufBestSize;
    hdiff_private::TAutoMem _cache(kACacheBufSize*2);
    hpatch_byte* bufx=_cache.data();
    hpatch_byte* bufy=bufx+kACacheBufSize;
    for (hpatch_StreamPos_t i=0; i<ssize; ){
        const hpatch_StreamPos_t maxdSize=ssize-i;
        size_t dataSize=(size_t)(kACacheBufSize<=maxdSize?kACacheBufSize:maxdSize);
        check(x->read(x,i,bufx,bufx+dataSize));
        check(y->read(y,i,bufy,bufy+dataSize));
        if (0!=memcmp(bufx,bufy,dataSize))
            return hpatch_FALSE;
        i+=dataSize;
    }
    return hpatch_TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
xorl %r12d, %r12d
movq %rax, (%rsp)
cmpq 0x8(%rsi), %rax
jne 0x11c14
movq %rsi, %r14
movq %rdi, %r15
movl $0x100000, %edi         # imm = 0x100000
callq 0x4400
testq %rax, %rax
je 0x11c76
movq %rax, %rbx
leaq 0x80000(%rax), %r12
xorl %r13d, %r13d
movq %r13, %rbp
movq (%rsp), %r13
subq %rbp, %r13
jbe 0x11c01
movl $0x80000, %eax          # imm = 0x80000
cmpq %rax, %r13
cmovaeq %rax, %r13
leaq (%rbx,%r13), %rcx
movq %r15, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq *0x10(%r15)
testl %eax, %eax
je 0x11c44
leaq (%r12,%r13), %rcx
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq *0x10(%r14)
testl %eax, %eax
je 0x11c26
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x4310
addq %rbp, %r13
testl %eax, %eax
je 0x11baa
xorl %r12d, %r12d
cmpq %rbp, (%rsp)
setbe %r12b
movq %rbx, %rdi
callq 0x43b0
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %r15
leaq 0x4a001(%rip), %rsi     # 0x5bc3b
movq %rax, %rdi
callq 0x4110
jmp 0x11c60
movl $0x10, %edi
callq 0x4190
movq %rax, %r15
leaq 0x49fb6(%rip), %rsi     # 0x5bc0e
movq %rax, %rdi
callq 0x4110
movq 0x6a381(%rip), %rsi     # 0x7bfe8
movq 0x6a34a(%rip), %rdx     # 0x7bfb8
movq %r15, %rdi
callq 0x4590
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x4a685(%rip), %rsi     # 0x5c30f
movq %rax, %rdi
callq 0x4110
movq 0x6a34f(%rip), %rsi     # 0x7bfe8
movq 0x6a318(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
jmp 0x11cd1
jmp 0x11cb7
movq %rax, %r14
movq %r15, %rdi
callq 0x4260
jmp 0x11cc9
jmp 0x11cc6
movq %rax, %r14
movq %rbx, %rdi
callq 0x43b0
movq %r14, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::assert_covers_safe(std::vector<(anonymous namespace)::TOldCover, std::allocator<(anonymous namespace)::TOldCover>> const&, unsigned long long, unsigned long long)
static void assert_covers_safe(const TCovers& covers,hpatch_StreamPos_t newSize,hpatch_StreamPos_t oldSize){
        hpatch_StreamPos_t lastNewEnd=0;
        for (size_t i=0;i<covers.coverCount();++i){
            TCover cover;
            covers.covers(i,&cover);
            assert_cover_safe(cover,lastNewEnd,newSize,oldSize);
            lastNewEnd=cover.newPos+cover.length;
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
subq %rdi, %rsi
je 0x11f1b
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rax
addq $0x10, %rdi
xorl %esi, %esi
movq (%rdi), %r8
testq %r8, %r8
je 0x11f23
movq -0x8(%rdi), %r9
cmpq %rsi, %r9
jb 0x11f44
cmpq %rdx, %r9
jae 0x11ffe
movq %r9, %rsi
addq %r8, %rsi
je 0x11f65
cmpq %rdx, %rsi
ja 0x11f86
movq -0x10(%rdi), %r9
cmpq %rcx, %r9
jae 0x11fe0
addq %r9, %r8
je 0x11fa4
cmpq %rcx, %r8
ja 0x11fc2
addq $0x18, %rdi
decq %rax
jne 0x11ec8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x49fc0(%rip), %rsi     # 0x5bef7
movq %rax, %rdi
callq 0x4110
jmp 0x1201a
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x49fbb(%rip), %rsi     # 0x5bf13
movq %rax, %rdi
callq 0x4110
jmp 0x1201a
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x49fe2(%rip), %rsi     # 0x5bf5b
movq %rax, %rdi
callq 0x4110
jmp 0x1201a
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x49fea(%rip), %rsi     # 0x5bf84
movq %rax, %rdi
callq 0x4110
jmp 0x1201a
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x4a01e(%rip), %rsi     # 0x5bfd6
movq %rax, %rdi
callq 0x4110
jmp 0x1201a
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x4a029(%rip), %rsi     # 0x5bfff
movq %rax, %rdi
callq 0x4110
jmp 0x1201a
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x49fc0(%rip), %rsi     # 0x5bfb4
movq %rax, %rdi
callq 0x4110
jmp 0x1201a
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x49f27(%rip), %rsi     # 0x5bf39
movq %rax, %rdi
callq 0x4110
movq 0x69fc7(%rip), %rsi     # 0x7bfe8
movq 0x69f90(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
jmp 0x1203e
jmp 0x1203e
jmp 0x1203e
jmp 0x1203e
jmp 0x1203e
jmp 0x1203e
jmp 0x1203e
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::_fsearch_and_dispose_cover_thread(std::vector<(anonymous namespace)::TOldCover, std::allocator<(anonymous namespace)::TOldCover>>*, (anonymous namespace)::mt_data_t*)
static void _fsearch_and_dispose_cover_thread(std::vector<TOldCover>* _covers,mt_data_t* mt){
        std::vector<TOldCover>& covers=*_covers;
        const TDiffData& diff=*mt->diff;
        hdiff_TRange newRange;
        while (mt->nextBlock(&newRange)){
            TDiffData diff_part=diff;
            diff_part.newData=diff.newData+(size_t)newRange.beginPos;
            diff_part.newData_end=diff.newData+(size_t)newRange.endPos;
            size_t coverCountBack=covers.size();
            first_search_and_dispose_cover(covers,diff_part,*mt->sstring,mt->kMinSingleMatchScore,mt->isCanExtendCover);
            for (size_t i=coverCountBack;i<covers.size();++i)
                covers[i].newPos+=(TInt)newRange.beginPos;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %r13
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
leaq 0x10(%rsp), %r15
movq %r13, %rcx
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x1223a
movq %rsp, %rsi
callq *0x30(%rdi)
testl %eax, %eax
je 0x12303
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
jmp 0x12277
movq 0x8(%rcx), %rax
subq (%rcx), %rax
movl $0x1, %ecx
lock
xaddq %rcx, 0x30(%rbx)
movq 0x20(%rbx), %rdx
imulq %rdx, %rcx
cmpq %rax, %rcx
jae 0x12303
movq %rcx, (%rsp)
addq %rcx, %rdx
addq $0x800, %rdx            # imm = 0x800
cmpq %rax, %rdx
cmovbq %rdx, %rax
movq %rax, 0x8(%rsp)
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq (%r13), %rdx
addq %rdx, %rcx
movq %rcx, 0x10(%rsp)
addq %rdx, %rax
movq %rax, 0x18(%rsp)
movq 0x8(%r14), %r12
subq (%r14), %r12
sarq $0x3, %r12
imulq %rbp, %r12
movq 0x8(%rbx), %rdx
movl 0x18(%rbx), %ecx
movzbl 0x28(%rbx), %r9d
movq %r14, %rdi
movq %r15, %rsi
xorl %r8d, %r8d
callq 0x1263d
movq (%r14), %rdx
movq 0x8(%r14), %rax
subq %rdx, %rax
sarq $0x3, %rax
imulq %rbp, %rax
subq %r12, %rax
jbe 0x122fb
movq (%rsp), %rcx
leaq (%r12,%r12,2), %rsi
leaq (%rdx,%rsi,8), %rdx
addq $0x8, %rdx
addq %rcx, (%rdx)
addq $0x18, %rdx
decq %rax
jne 0x122ef
movq (%rbx), %rcx
jmp 0x12218
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::select_cover(std::vector<(anonymous namespace)::TOldCover, std::allocator<(anonymous namespace)::TOldCover>>&, unsigned long, (anonymous namespace)::TDiffData const&, int, (anonymous namespace)::TDiffLimit*, bool)
static void select_cover(std::vector<TOldCover>& covers,size_t cover_begin,const TDiffData& diff,
                         int kMinSingleMatchScore,TDiffLimit* diffLimit,bool isCanExtendCover){
    if (diffLimit==0){
        TCompressDetect  nocover_detect;
        TCompressDetect  cover_detect;
        _select_cover(covers,cover_begin,diff,kMinSingleMatchScore,nocover_detect,cover_detect,0,isCanExtendCover);
    }else{
        _select_cover(covers,cover_begin,diff,kMinSingleMatchScore,diffLimit->nocover_detect,
                      diffLimit->cover_detect,diffLimit,isCanExtendCover);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %r9d, %ebp
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
testq %r8, %r8
je 0x13d14
movq %r8, %rax
movq 0x28(%r8), %r8
movq 0x30(%rax), %r9
movzbl %bpl, %r10d
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
pushq %r10
pushq %rax
callq 0x13e32
addq $0x70, %rsp
jmp 0x13d5f
leaq 0x30(%rsp), %rdi
callq 0x1d096
movq %rsp, %rdi
callq 0x1d096
movzbl %bpl, %eax
leaq 0x30(%rsp), %r8
movq %rsp, %r9
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
pushq %rax
pushq $0x0
callq 0x13e32
addq $0x10, %rsp
movq %rsp, %rdi
callq 0x1d17e
leaq 0x30(%rsp), %rdi
callq 0x1d17e
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1d17e
jmp 0x13d78
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x1d17e
movq %rbx, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::getCanExtendLength(long, long, int, long, long, (anonymous namespace)::TDiffData const&, unsigned long)
static TInt getCanExtendLength(TInt oldPos,TInt newPos,int inc,TInt newPos_min,TInt lastNewEnd,
                                   const TDiffData& diff,const TFixedFloatSmooth kExtendMinSameRatio){
        static const unsigned int kSmoothLength=4;

        TFixedFloatSmooth curBestSameRatio=0;
        TInt curBestLength=0;
        TUInt curSameCount=0;
        const TFixedFloatSmooth kLimitSameCount=(~(TFixedFloatSmooth)0)/kFixedFloatSmooth_base;
        for (TUInt length=1; (oldPos>=0)&&(oldPos<(diff.oldData_end-diff.oldData))
             &&(newPos>=newPos_min)&&(newPos<lastNewEnd); ++length,oldPos+=inc,newPos+=inc) {
            if (diff.oldData[oldPos]==diff.newData[newPos]){
                ++curSameCount;
                
                if (curSameCount>= kLimitSameCount) break; //for curSameCount*kFixedFloatSmooth_base
                const TFixedFloatSmooth curSameRatio= (curSameCount*kFixedFloatSmooth_base)
                                                      /(length+kSmoothLength);
                if (curSameRatio>=curBestSameRatio){
                    curBestSameRatio=curSameRatio;
                    curBestLength=length;
                }
            }
        }
        if ((curBestSameRatio<kExtendMinSameRatio)||(curBestLength<=2)){
            curBestLength=0;
        }
        
        return curBestLength;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
js 0x13e0b
movq 0x18(%r9), %rbx
movq (%r9), %r14
movq 0x10(%r9), %r15
subq %r15, %rbx
movslq %edx, %r12
movl $0x5, %r13d
xorl %ebp, %ebp
movabsq $0x3ffffffffffffe, %r10 # imm = 0x3FFFFFFFFFFFFE
xorl %r9d, %r9d
xorl %r11d, %r11d
cmpq %rbx, %rdi
jge 0x13e11
cmpq %rcx, %rsi
jl 0x13e11
cmpq %r8, %rsi
jge 0x13e11
movb (%r15,%rdi), %al
cmpb (%r14,%rsi), %al
jne 0x13dfe
incq %rbp
cmpq %r10, %rbp
ja 0x13e11
movq %rbp, %rax
shlq $0xa, %rax
xorl %edx, %edx
divq %r13
cmpq %r11, %rax
cmovaq %rax, %r11
leaq -0x4(%r13), %rax
cmovaeq %rax, %r9
addq %r12, %rsi
incq %r13
addq %r12, %rdi
jns 0x13dc2
jmp 0x13e11
xorl %r11d, %r11d
xorl %r9d, %r9d
xorl %eax, %eax
cmpq $0x3, %r9
cmovlq %rax, %r9
cmpq 0x38(%rsp), %r11
cmovbq %rax, %r9
movq %r9, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/pack_uint.h
// Function: hdiff_private::pushBack(std::vector<unsigned char, std::allocator<unsigned char>>&, hpatch_TStreamInput const*)
static void pushBack(std::vector<unsigned char>& out_buf,const hpatch_TStreamInput* data){
    const size_t kStepSize=hpatch_kStreamCacheSize*2;
    unsigned char buf[kStepSize];
    out_buf.reserve(out_buf.size()+(size_t)data->streamSize);
    hpatch_StreamPos_t curPos=0;
    while (curPos<data->streamSize){
        size_t len=kStepSize;
        if (curPos+len>data->streamSize)
            len=(size_t)(data->streamSize-curPos);
        if (!data->read(data,curPos,buf,buf+len))
            throw std::runtime_error("pushBack() data->read() error!");
        pushBack(out_buf,buf,len);
        curPos+=len;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rsi
subq (%rdi), %rsi
addq 0x8(%rbx), %rsi
callq 0x15638
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x153c4
xorl %r15d, %r15d
movq %rsp, %r12
movl $0x2000, %edx           # imm = 0x2000
leaq (%r15,%rdx), %rcx
movq %rax, %rbp
subq %r15, %rbp
cmpq %rax, %rcx
cmovbeq %rdx, %rbp
leaq (%rsp,%rbp), %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq *0x10(%rbx)
testl %eax, %eax
je 0x153d6
movq 0x8(%r14), %rsi
movq %r14, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x9e38
addq %rbp, %r15
movq 0x8(%rbx), %rax
cmpq %rax, %r15
jb 0x15379
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x46d89(%rip), %rsi     # 0x5c173
movq %rax, %rdi
callq 0x4110
movq 0x66bef(%rip), %rsi     # 0x7bfe8
movq 0x66bb8(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/stream_serialize.h
// Function: hdiff_private::TVectorAsStreamOutput::_write(hpatch_TStreamOutput const*, unsigned long long, unsigned char const*, unsigned char const*)
static hpatch_BOOL _write(const hpatch_TStreamOutput* stream,
                            const hpatch_StreamPos_t writeToPos,
                            const unsigned char* data,const unsigned char* data_end){
        TVectorAsStreamOutput* self=(TVectorAsStreamOutput*)stream->streamImport;
        std::vector<unsigned char>& dst=self->dst;
        size_t writeLen=(size_t)(data_end-data);
        if (writeToPos>dst.size()) return hpatch_FALSE;
        if  (dst.size()==writeToPos){
            dst.insert(dst.end(),data,data_end);
        }else{
            if (writeToPos+writeLen!=(size_t)(writeToPos+writeLen)) return hpatch_FALSE;
            if (dst.size()<writeToPos+writeLen)
                dst.resize((size_t)(writeToPos+writeLen));
            memcpy(&dst[(size_t)writeToPos],data,writeLen);
        }
        return hpatch_TRUE;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq (%rdi), %rax
movq 0x20(%rax), %r12
movq %rcx, %r15
subq %rdx, %r15
movq (%r12), %rdx
movq 0x8(%r12), %rdi
subq %rdx, %rdi
xorl %eax, %eax
cmpq %rsi, %rdi
jb 0x15774
movq %rsi, %r14
jne 0x15749
addq %r14, %rdx
movq %r12, %rdi
movq %rdx, %rsi
movq %rbx, %rdx
callq 0x9e38
jmp 0x1576f
leaq (%r15,%r14), %rsi
cmpq %rsi, %rdi
jae 0x1575e
movq %r12, %rdi
callq 0x9b50
movq (%r12), %rdx
addq %r14, %rdx
movq %rdx, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x4290
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/limit_mem_diff/covers.h
// Function: hdiff_private::TCoversBuf::_push_cover(hpatch_TOutputCovers*, hpatch_TCover const*)
static hpatch_BOOL _push_cover(struct hpatch_TOutputCovers* out_covers,const TCover* cover){
        TCoversBuf* self=(TCoversBuf*)out_covers;
        if (self->_isCover32) {
            hpatch_TCover32 c32;
            c32.oldPos=(hpatch_uint32_t)cover->oldPos;
            c32.newPos=(hpatch_uint32_t)cover->newPos;
            c32.length=(hpatch_uint32_t)cover->length;
            self->m_covers_limit.push_back(c32);
            self->_update(self->m_covers_limit);
        }else{
            self->m_covers_larger.push_back(*cover);
            self->_update(self->m_covers_larger);
        }
        return hpatch_TRUE;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
cmpb $0x1, 0x20(%rdi)
jne 0x15884
movdqu (%rdx), %xmm0
pshufd $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3]
movq %xmm0, (%rsp)
movl 0x10(%rdx), %eax
movl %eax, 0x8(%rsp)
movq 0x30(%rbx), %rsi
cmpq 0x38(%rbx), %rsi
je 0x158ac
movl 0x8(%rsp), %eax
movl %eax, 0x8(%rsi)
movq (%rsp), %rax
movq %rax, (%rsi)
movq 0x30(%rbx), %rax
addq $0xc, %rax
movq %rax, 0x30(%rbx)
jmp 0x158bc
movq 0x48(%rbx), %rsi
cmpq 0x50(%rbx), %rsi
je 0x158cd
movq 0x10(%rdx), %rax
movq %rax, 0x10(%rsi)
movdqu (%rdx), %xmm0
movdqu %xmm0, (%rsi)
movq 0x48(%rbx), %rax
addq $0x18, %rax
movq %rax, 0x48(%rbx)
jmp 0x158da
leaq 0x28(%rbx), %rdi
movq %rsp, %rdx
callq 0x15bca
movq 0x30(%rbx), %rax
movq 0x28(%rbx), %rcx
movq %rcx, 0x10(%rbx)
subq %rcx, %rax
sarq $0x2, %rax
jmp 0x158e9
leaq 0x40(%rbx), %rdi
callq 0x15d40
movq 0x48(%rbx), %rax
movq 0x40(%rbx), %rcx
movq %rcx, 0x10(%rbx)
subq %rcx, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rcx
movq %rcx, 0x18(%rbx)
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: hdiff_private::doPackData(unsigned char*, unsigned char*, std::vector<hpatch_TCover, std::allocator<hpatch_TCover>> const&)
static unsigned char* doPackData(unsigned char* data,unsigned char* data_end,
                                     const std::vector<TPackedCover>& packedCovers){
        unsigned char* dst=data;
        for (size_t i=0;i<packedCovers.size();++i){
            const TPackedCover& cv=packedCovers[i];
            assert(dst==data+cv.newPos);
            memmove(data+cv.newPos,data+cv.oldPos,(size_t)cv.length);
            dst=data+cv.newPos+cv.length;
        }
        return dst;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %r15
cmpq %r15, 0x8(%rsi)
je 0x17347
movq %rsi, %r14
movl $0x10, %r12d
xorl %r13d, %r13d
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
movq %rbx, %rdi
movq -0x8(%r15,%r12), %rax
addq %rbx, %rax
cmpq %rax, %rdi
jne 0x1735c
movq -0x10(%r15,%r12), %rsi
addq %rbx, %rsi
movq (%r15,%r12), %rdx
callq 0x4510
movq -0x8(%r15,%r12), %rdi
addq %rbx, %rdi
addq (%r15,%r12), %rdi
incq %r13
movq (%r14), %r15
movq 0x8(%r14), %rax
subq %r15, %rax
sarq $0x3, %rax
imulq %rbp, %rax
addq $0x18, %r12
cmpq %rax, %r13
jb 0x172fd
jmp 0x1734a
movq %rbx, %rdi
movq %rdi, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x45224(%rip), %rdi     # 0x5c587
leaq 0x45231(%rip), %rsi     # 0x5c59b
leaq 0x45259(%rip), %rcx     # 0x5c5ca
movl $0x6f, %edx
callq 0x4200
nop
// File: /workspace/github_cpp_makefile_star2_O3/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: hdiff_private::TCoversOptim::_insert_cover(ICoverLinesListener*, IDiffInsertCover*, void*, unsigned long, bool, unsigned long long*, unsigned long long*)
void TCoversOptim::_insert_cover(ICoverLinesListener* listener,IDiffInsertCover* diffi,void* pcovers,size_t coverCount,bool isCover32,
                                    hpatch_StreamPos_t* newSize,hpatch_StreamPos_t* oldSize){
    TCoversOptim* self=(TCoversOptim*)listener;
    if (self->matchBlock!=0){
        _check((hpatch_StreamPos_t)(self->matchBlock->newData_end_cur-self->matchBlock->newData)==*newSize,"unpackData error!");
        _check((hpatch_StreamPos_t)(self->matchBlock->oldData_end_cur-self->matchBlock->oldData)==*oldSize,"unpackData error!");
        self->matchBlock->unpackData(diffi,pcovers,coverCount,isCover32);
        *newSize=self->matchBlock->newData_end_cur-self->matchBlock->newData;
        *oldSize=self->matchBlock->oldData_end_cur-self->matchBlock->oldData;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0x17ebc
movq %r9, %rbx
movq 0x10(%rdi), %rax
subq (%rdi), %rax
cmpq (%r9), %rax
jne 0x17ec2
movq 0x20(%rsp), %r15
movq 0x28(%rdi), %rax
subq 0x18(%rdi), %rax
cmpq (%r15), %rax
jne 0x17ee0
movzbl %r8b, %r8d
callq 0x1737c
movq 0x40(%r14), %rax
movq 0x10(%rax), %rcx
subq (%rax), %rcx
movq %rcx, (%rbx)
movq 0x28(%rax), %rcx
subq 0x18(%rax), %rcx
movq %rcx, (%r15)
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x4465f(%rip), %rsi     # 0x5c535
movq %rax, %rdi
callq 0x4110
jmp 0x17efc
movl $0x10, %edi
callq 0x4190
movq %rax, %rbx
leaq 0x44641(%rip), %rsi     # 0x5c535
movq %rax, %rdi
callq 0x4110
movq 0x640e5(%rip), %rsi     # 0x7bfe8
movq 0x640ae(%rip), %rdx     # 0x7bfb8
movq %rbx, %rdi
callq 0x4590
jmp 0x17f14
movq %rax, %r14
movq %rbx, %rdi
callq 0x4260
movq %r14, %rdi
callq 0x45e0