LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: create_compressed_diff_block(unsigned char*, unsigned char*, unsigned char*, unsigned char*, hpatch_TStreamOutput const*, hdiff_TCompress const*, int, bool, unsigned long, unsigned long)
void create_compressed_diff_block(unsigned char* newData,unsigned char* newData_end,
                                  unsigned char* oldData,unsigned char* oldData_end,
                                  const hpatch_TStreamOutput* out_diff,const hdiff_TCompress* compressPlugin,
                                  int kMinSingleMatchScore,bool isUseBigCacheMatch,
                                  size_t matchBlockSize,size_t threadNum){
    if (matchBlockSize==0){
        create_compressed_diff(newData,newData_end,oldData,oldData_end,
                               out_diff,compressPlugin,kMinSingleMatchScore,isUseBigCacheMatch,0,threadNum);
        return;
    }
    TCoversOptimMB<TMatchBlock> coversOp(newData,newData_end,oldData,oldData_end,matchBlockSize,threadNum);
    create_compressed_diff(newData,coversOp.matchBlock->newData_end_cur,oldData,coversOp.matchBlock->oldData_end_cur,
                           out_diff,compressPlugin,kMinSingleMatchScore,isUseBigCacheMatch,&coversOp,threadNum);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r8
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %r12
movq 0x128(%rsp), %r11
movq 0x120(%rsp), %r9
movb 0x118(%rsp), %bpl
movl 0x110(%rsp), %r10d
testq %r9, %r9
je 0x14a5b
subq $0x8, %rsp
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rcx
pushq %r11
callq 0x14e34
popq %rax
popq %rcx
movq 0x40(%r13), %rax
movq 0x10(%rax), %rsi
movq 0x28(%rax), %rcx
movzbl %bpl, %eax
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %r8
movq %rbx, %r9
pushq 0x128(%rsp)
pushq %r13
pushq %rax
movl 0x128(%rsp), %eax
pushq %rax
callq 0xcbc0
addq $0x20, %rsp
leaq 0x50(%rsp), %rdi
callq 0x14ff0
addq $0xd8, %rsp
jmp 0x14a84
movzbl %bpl, %eax
movq %r12, %rdi
movq %rdx, %rsi
movq %r15, %rdx
movq %r8, %rcx
movq %r14, %r8
movq %rbx, %r9
pushq %r11
pushq $0x0
pushq %rax
pushq %r10
callq 0xcbc0
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x14ff0
movq %rbx, %rdi
callq 0x4600
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: create_compressed_diff_block(hpatch_TStreamInput const*, hpatch_TStreamInput const*, hpatch_TStreamOutput const*, hdiff_TCompress const*, int, bool, unsigned long, unsigned long)
void create_compressed_diff_block(const hpatch_TStreamInput* newData,const hpatch_TStreamInput* oldData,
                                  const hpatch_TStreamOutput* out_diff,const hdiff_TCompress* compressPlugin,
                                  int kMinSingleMatchScore,bool isUseBigCacheMatch,
                                  size_t matchBlockSize,size_t threadNum){
    TAutoMem oldAndNewData;
    loadOldAndNewStream(oldAndNewData,oldData,newData);
    size_t old_size=oldData?(size_t)oldData->streamSize:0;
    unsigned char* pOldData=oldAndNewData.data();
    unsigned char* pNewData=pOldData+old_size;
    create_compressed_diff_block(pNewData,pNewData+(size_t)newData->streamSize,pOldData,pOldData+old_size,
                                 out_diff,compressPlugin,kMinSingleMatchScore,isUseBigCacheMatch,matchBlockSize,threadNum);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebp
movq %r8, 0x8(%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11e94
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x147df
movq 0x68(%rsp), %r10
movq 0x60(%rsp), %rax
testq %r13, %r13
je 0x14af8
movq 0x8(%r13), %rcx
jmp 0x14afa
xorl %ecx, %ecx
movq 0x10(%rsp), %rdx
addq %rdx, %rcx
movq 0x8(%r12), %rsi
addq %rcx, %rsi
movzbl %bpl, %r11d
movq %rcx, %rdi
movq %r15, %r8
movq %r14, %r9
pushq %r10
pushq %rax
pushq %r11
pushq 0x20(%rsp)
callq 0x149ae
addq $0x20, %rsp
leaq 0x10(%rsp), %rdi
callq 0x13a5c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14b44
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x13a5c
movq %rbx, %rdi
callq 0x4600
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: create_single_compressed_diff_block(unsigned char*, unsigned char*, unsigned char*, unsigned char*, hpatch_TStreamOutput const*, hdiff_TCompress const*, int, unsigned long, bool, unsigned long, unsigned long)
void create_single_compressed_diff_block(unsigned char* newData,unsigned char* newData_end,
                                         unsigned char* oldData,unsigned char* oldData_end,
                                         const hpatch_TStreamOutput* out_diff,const hdiff_TCompress* compressPlugin,
                                         int kMinSingleMatchScore,size_t patchStepMemSize,
                                         bool isUseBigCacheMatch,size_t matchBlockSize,size_t threadNum){
    if (matchBlockSize==0){
        create_single_compressed_diff(newData,newData_end,oldData,oldData_end,
                                      out_diff,compressPlugin,kMinSingleMatchScore,
                                      patchStepMemSize,isUseBigCacheMatch,0,threadNum);
        return;
    }
    TCoversOptimMB<TMatchBlock> coversOp(newData,newData_end,oldData,oldData_end,matchBlockSize,threadNum);
    create_single_compressed_diff(newData,coversOp.matchBlock->newData_end_cur,oldData,coversOp.matchBlock->oldData_end_cur,
                                  out_diff,compressPlugin,kMinSingleMatchScore,
                                  patchStepMemSize,isUseBigCacheMatch,&coversOp,threadNum);                                      
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r8
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %r12
movq 0x130(%rsp), %r13
movq 0x128(%rsp), %r9
movb 0x120(%rsp), %bpl
movl 0x110(%rsp), %r10d
testq %r9, %r9
je 0x14c13
subq $0x8, %rsp
movq %r13, %rax
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rcx
pushq %rax
callq 0x14e34
popq %rax
popq %rcx
movq 0x40(%r13), %rax
movq 0x10(%rax), %rsi
movq 0x28(%rax), %rcx
subq $0x8, %rsp
movzbl %bpl, %eax
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %r8
movq %rbx, %r9
pushq 0x138(%rsp)
pushq %r13
pushq %rax
pushq 0x138(%rsp)
movl 0x138(%rsp), %eax
pushq %rax
callq 0xccdd
addq $0x30, %rsp
leaq 0x50(%rsp), %rdi
callq 0x14ff0
addq $0xd8, %rsp
jmp 0x14c47
subq $0x8, %rsp
movzbl %bpl, %eax
movq %r12, %rdi
movq %rdx, %rsi
movq %r15, %rdx
movq %r8, %rcx
movq %r14, %r8
movq %rbx, %r9
pushq %r13
pushq $0x0
pushq %rax
pushq 0x138(%rsp)
pushq %r10
callq 0xccdd
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x14ff0
movq %rbx, %rdi
callq 0x4600
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: create_single_compressed_diff_block(unsigned char*, unsigned char*, unsigned char*, unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>&, hdiff_TCompress const*, int, unsigned long, bool, unsigned long, unsigned long)
void create_single_compressed_diff_block(unsigned char* newData,unsigned char* newData_end,
                                         unsigned char* oldData,unsigned char* oldData_end,
                                         std::vector<unsigned char>& out_diff,const hdiff_TCompress* compressPlugin,
                                         int kMinSingleMatchScore,size_t patchStepMemSize,
                                         bool isUseBigCacheMatch,size_t matchBlockSize,size_t threadNum){
    if (matchBlockSize==0){
        create_single_compressed_diff(newData,newData_end,oldData,oldData_end,
                                      out_diff,compressPlugin,kMinSingleMatchScore,
                                      patchStepMemSize,isUseBigCacheMatch,0,threadNum);
        return;
    }
    TCoversOptimMB<TMatchBlock> coversOp(newData,newData_end,oldData,oldData_end,matchBlockSize,threadNum);
    create_single_compressed_diff(newData,coversOp.matchBlock->newData_end_cur,oldData,coversOp.matchBlock->oldData_end_cur,
                                  out_diff,compressPlugin,kMinSingleMatchScore,
                                  patchStepMemSize,isUseBigCacheMatch,&coversOp,threadNum); 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r8
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %r12
movq 0x130(%rsp), %r13
movq 0x128(%rsp), %r9
movb 0x120(%rsp), %bpl
movl 0x110(%rsp), %r10d
testq %r9, %r9
je 0x14d21
subq $0x8, %rsp
movq %r13, %rax
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rcx
pushq %rax
callq 0x14e34
popq %rax
popq %rcx
movq 0x40(%r13), %rax
movq 0x10(%rax), %rsi
movq 0x28(%rax), %rcx
subq $0x8, %rsp
movzbl %bpl, %eax
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %r8
movq %rbx, %r9
pushq 0x138(%rsp)
pushq %r13
pushq %rax
pushq 0x138(%rsp)
movl 0x138(%rsp), %eax
pushq %rax
callq 0xcc79
addq $0x30, %rsp
leaq 0x50(%rsp), %rdi
callq 0x14ff0
addq $0xd8, %rsp
jmp 0x14d55
subq $0x8, %rsp
movzbl %bpl, %eax
movq %r12, %rdi
movq %rdx, %rsi
movq %r15, %rdx
movq %r8, %rcx
movq %r14, %r8
movq %rbx, %r9
pushq %r13
pushq $0x0
pushq %rax
pushq 0x138(%rsp)
pushq %r10
callq 0xcc79
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x14ff0
movq %rbx, %rdi
callq 0x4600
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/match_block.cpp
// Function: create_single_compressed_diff_block(hpatch_TStreamInput const*, hpatch_TStreamInput const*, hpatch_TStreamOutput const*, hdiff_TCompress const*, int, unsigned long, bool, unsigned long, unsigned long)
void create_single_compressed_diff_block(const hpatch_TStreamInput* newData,const hpatch_TStreamInput* oldData,
                                         const hpatch_TStreamOutput* out_diff,const hdiff_TCompress* compressPlugin,
                                         int kMinSingleMatchScore,size_t patchStepMemSize,
                                         bool isUseBigCacheMatch,size_t matchBlockSize,size_t threadNum){
    TAutoMem oldAndNewData;
    loadOldAndNewStream(oldAndNewData,oldData,newData);
    size_t old_size=oldData?(size_t)oldData->streamSize:0;
    unsigned char* pOldData=oldAndNewData.data();
    unsigned char* pNewData=pOldData+old_size;
    create_single_compressed_diff_block(pNewData,pNewData+(size_t)newData->streamSize,pOldData,pOldData+old_size,
                                        out_diff,compressPlugin,kMinSingleMatchScore,
                                        patchStepMemSize,isUseBigCacheMatch,matchBlockSize,threadNum);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq %r8, 0x8(%rsp)
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %r13
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x11e94
movq %rbx, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x147df
movq 0x70(%rsp), %r10
movq 0x68(%rsp), %rax
movb 0x60(%rsp), %dil
testq %rbp, %rbp
je 0x14dce
movq 0x8(%rbp), %rcx
jmp 0x14dd0
xorl %ecx, %ecx
movq 0x10(%rsp), %rdx
addq %rdx, %rcx
movq 0x8(%r13), %rsi
addq %rcx, %rsi
subq $0x8, %rsp
movzbl %dil, %r11d
movq %rcx, %rdi
movq %r12, %r8
movq %r15, %r9
pushq %r10
pushq %rax
pushq %r11
pushq %r14
pushq 0x30(%rsp)
callq 0x14b59
addq $0x30, %rsp
leaq 0x10(%rsp), %rdi
callq 0x13a5c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14e1f
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x13a5c
movq %rbx, %rdi
callq 0x4600
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::(anonymous namespace)::TStreamRLE::append(unsigned char const*, unsigned char const*)
void append(const unsigned char* appendData,const unsigned char* appendData_end){
            if (sameCount==0){
                if (appendData!=appendData_end){
                    sameCur=*appendData++;
                    sameCount=1;
                }else{
                    return;
                }
            }
            while (appendData!=appendData_end){
                TByte cur=*appendData++;
                if (cur==sameCur){
                    ++sameCount;
                }else{
                    endSame();
                    sameCur=cur;
                    sameCount=1;
                }
            }
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x18(%rdi), %rax
testq %rax, %rax
jne 0x17396
cmpq %rbx, %r14
je 0x173c5
movb (%r14), %al
incq %r14
movb %al, 0x10(%r15)
movq $0x1, 0x18(%r15)
pushq $0x1
popq %rax
pushq $0x1
popq %r12
cmpq %rbx, %r14
je 0x173c5
movb (%r14), %bpl
cmpb 0x10(%r15), %bpl
jne 0x173ad
incq %rax
jmp 0x173bc
movq %r15, %rdi
callq 0x17ad2
movb %bpl, 0x10(%r15)
movq %r12, %rax
incq %r14
movq %rax, 0x18(%r15)
jmp 0x1739a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::bytesRLE_save(std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>>&, hpatch_TStreamInput const*, int)
void bytesRLE_save(std::vector<unsigned char>& out_ctrlBuf,std::vector<unsigned char>& out_codeBuf,
                   const hpatch_TStreamInput* src,int rle_parameter){
    TStreamRLE rle(out_ctrlBuf,out_codeBuf,rle_parameter);
    TByte buf[kStepSize];
    hpatch_StreamPos_t readPos=0;
    while (readPos<src->streamSize){
        size_t len=kStepSize;
        if (len+readPos>src->streamSize)
            len=(size_t)(src->streamSize-readPos);
        if (!src->read(src,readPos,buf,buf+len))
            throw std::runtime_error("bytesRLE_save() src->read()");
        rle.append(buf,buf+len);
        readPos+=len;
    }
    rle.finishAppend();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4038, %rsp           # imm = 0x4038
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %rsi
movq %rsp, %rdi
callq 0x17320
xorl %r15d, %r15d
movl $0x4000, %ebp           # imm = 0x4000
leaq 0x30(%rsp), %r12
movq 0x8(%rbx), %rax
movq %rax, %r14
subq %r15, %r14
jbe 0x17454
leaq (%r15,%rbp), %rcx
cmpq %rax, %rcx
cmovbeq %rbp, %r14
leaq (%rsp,%r14), %r13
addq $0x30, %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq *0x10(%rbx)
testl %eax, %eax
je 0x1746e
movq %rsp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x17362
addq %r14, %r15
jmp 0x1740f
movq %rsp, %rdi
callq 0x173ce
addq $0x4038, %rsp           # imm = 0x4038
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x41c0
movq %rax, %rbx
leaq 0x3a415(%rip), %rsi     # 0x51895
movq %rax, %rdi
callq 0x4120
movq 0x5db59(%rip), %rsi     # 0x74fe8
movq 0x5db22(%rip), %rdx     # 0x74fb8
movq %rbx, %rdi
callq 0x45b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4290
movq %r14, %rdi
callq 0x4600
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::bytesRLE_save(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned char const*, unsigned char const*, int)
void bytesRLE_save(std::vector<TByte>& out_code,
                   const TByte* src,const TByte* src_end,int rle_parameter){
    std::vector<TByte> ctrlBuf;
    std::vector<TByte> codeBuf;

    bytesRLE_save(ctrlBuf,codeBuf,src,src_end,rle_parameter);
    packUInt(out_code,(TUInt)ctrlBuf.size());
    pushBack(out_code,ctrlBuf);
    pushBack(out_code,codeBuf);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movl %ecx, %r8d
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
callq 0x172dc
movq 0x8(%rsp), %rsi
subq (%rsp), %rsi
movq %rbx, %rdi
callq 0x17540
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x17549
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x17549
leaq 0x20(%rsp), %rdi
callq 0x8b88
movq %rsp, %rdi
callq 0x8b88
addq $0x40, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8b88
movq %rsp, %rdi
callq 0x8b88
movq %rbx, %rdi
callq 0x4600
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::bytesRLE_save(std::vector<unsigned char, std::allocator<unsigned char>>&, hpatch_TStreamInput const*, int)
void bytesRLE_save(std::vector<TByte>& out_code,const hpatch_TStreamInput* src,int rle_parameter){
    std::vector<TByte> ctrlBuf;
    std::vector<TByte> codeBuf;

    bytesRLE_save(ctrlBuf,codeBuf,src,rle_parameter);
    packUInt(out_code,(TUInt)ctrlBuf.size());
    pushBack(out_code,ctrlBuf);
    pushBack(out_code,codeBuf);
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movl %edx, %ecx
movq %rsi, %rdx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
callq 0x173e0
movq 0x8(%rsp), %rsi
subq (%rsp), %rsi
movq %rbx, %rdi
callq 0x17540
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x17549
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x17549
leaq 0x20(%rsp), %rdi
callq 0x8b88
movq %rsp, %rdi
callq 0x8b88
addq $0x40, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8b88
movq %rsp, %rdi
callq 0x8b88
movq %rbx, %rdi
callq 0x4600
nop
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::TSingleStreamRLE0::maxCodeSize(unsigned char const*, unsigned char const*) const
hpatch_StreamPos_t TSingleStreamRLE0::maxCodeSize(const unsigned char* appendData,const unsigned char* appendData_end) const{
        TLastType lastType=getLastType(*this);
        hpatch_StreamPos_t curLen0=this->len0;
        hpatch_StreamPos_t curLenv=this->uncompressData.size();
        hpatch_StreamPos_t fixedLen=this->fixed_code.size();
        _maxCodeSize(lastType,curLen0,curLenv,fixedLen,appendData,appendData_end);
        _maxCodeSize_end(lastType,curLen0,curLenv,fixedLen);
        return fixedLen;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x17e09
leaq 0x4(%rsp), %rdi
movl %eax, (%rdi)
movq 0x30(%r15), %rax
leaq 0x18(%rsp), %r12
movq %rax, (%r12)
movq 0x20(%r15), %rax
subq 0x18(%r15), %rax
leaq 0x10(%rsp), %r13
movq %rax, (%r13)
movq 0x8(%r15), %rax
subq (%r15), %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
movq %r12, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
callq 0x1766a
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1773d
movq (%r15), %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::_maxCodeSize(hdiff_private::TLastType&, unsigned long long&, unsigned long long&, unsigned long long&, unsigned char const*, unsigned char const*)
static void _maxCodeSize(TLastType& lastType,hpatch_StreamPos_t& curLen0,hpatch_StreamPos_t& curLenv,
                             hpatch_StreamPos_t& fixedLen,const unsigned char* appendData,const unsigned char* appendData_end){
        while (appendData!=appendData_end) {
            unsigned char v;
            size_t sLen0=0;
            do {
                v=*appendData++;
                if (0==v)
                    ++sLen0;
                else
                    break;
            }while (appendData!=appendData_end);
            if (sLen0>0){
                if (lastType==lastType_v){
                    fixedLen += _out_uncompressData_codeSize(curLenv);
                    curLenv = 0;
                }
                curLen0+=sLen0;
                lastType=lastType_same;
                if (v==0)
                    break;//appendData==appendData_end
            }
            if (lastType==lastType_same){
                fixedLen += _out_0Data_codeSize(curLen0);
                curLen0 = 0;
            }
            ++curLenv;
            lastType=lastType_v;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, %r15
movq %rcx, (%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %r13
movq %rdi, %rbp
movq %rsi, 0x10(%rsp)
cmpq %rbx, %r15
je 0x1772e
movq %rbx, %rax
subq %r15, %rax
xorl %r14d, %r14d
movb (%r15), %r12b
incq %r15
testb %r12b, %r12b
jne 0x176bd
incq %r14
cmpq %rbx, %r15
jne 0x176a4
movq %rbx, %r15
movq %rax, %r14
movl (%rbp), %eax
testq %r14, %r14
je 0x17710
cmpl $0x1, %eax
jne 0x176e9
movq 0x8(%rsp), %r13
movq (%r13), %rdi
callq 0x17e41
movq (%rsp), %rcx
addq %rax, (%rcx)
andq $0x0, (%r13)
movq 0x10(%rsp), %r13
addq (%r13), %r14
movq %r14, (%r13)
andl $0x0, (%rbp)
testb %r12b, %r12b
je 0x1772e
movq %r14, %rdi
callq 0x17f9e
movq (%rsp), %rcx
addq %rax, (%rcx)
andq $0x0, (%r13)
jmp 0x17714
testl %eax, %eax
je 0x17728
movq 0x8(%rsp), %rax
incq (%rax)
movl $0x1, (%rbp)
jmp 0x17692
movq (%r13), %r14
jmp 0x176fa
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::_maxCodeSize_end(hdiff_private::TLastType&, unsigned long long&, unsigned long long&, unsigned long long&)
static void _maxCodeSize_end(TLastType& lastType,hpatch_StreamPos_t& curLen0,
                                 hpatch_StreamPos_t& curLenv,hpatch_StreamPos_t& fixedLen){
        if (curLenv>0){
            fixedLen += _out_uncompressData_codeSize(curLenv);
            curLenv=0;
        }
        if (curLen0>0){
            fixedLen += _out_0Data_codeSize(curLen0);
            curLen0=0;
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x1775f
movq %rsi, %r15
callq 0x17e41
addq %rax, (%rbx)
andq $0x0, (%r15)
movq (%r14), %rdi
testq %rdi, %rdi
je 0x17773
callq 0x17f9e
addq %rax, (%rbx)
andq $0x0, (%r14)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::TSingleStreamRLE0::maxCodeSize(hpatch_TStreamInput const*) const
hpatch_StreamPos_t TSingleStreamRLE0::maxCodeSize(const hpatch_TStreamInput* appendData) const{
        TLastType lastType=getLastType(*this);
        hpatch_StreamPos_t curLen0=this->len0;
        hpatch_StreamPos_t curLenv=this->uncompressData.size();
        hpatch_StreamPos_t fixedLen=this->fixed_code.size();
        
        TByte buf[kStepSize];
        hpatch_StreamPos_t readPos=0;
        while (readPos<appendData->streamSize){
            size_t len=kStepSize;
            if (len+readPos>appendData->streamSize)
                len=(size_t)(appendData->streamSize-readPos);
            if (!appendData->read(appendData,readPos,buf,buf+len))
                throw std::runtime_error("TSingleStreamRLE0::maxCodeSize() appendData->read()");
            _maxCodeSize(lastType,curLen0,curLenv,fixedLen,buf,buf+len);
            readPos+=len;
        }
        _maxCodeSize_end(lastType,curLen0,curLenv,fixedLen);
        return fixedLen;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4028, %rsp           # imm = 0x4028
movq %rsi, %rbx
movq %rdi, %r14
callq 0x17e09
leaq 0x4(%rsp), %rcx
movl %eax, (%rcx)
movq 0x30(%r14), %rax
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movq 0x20(%r14), %rax
subq 0x18(%r14), %rax
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq 0x8(%r14), %rax
subq (%r14), %rax
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
xorl %ebp, %ebp
movl $0x4000, %r12d          # imm = 0x4000
leaq 0x20(%rsp), %r14
movq 0x8(%rbx), %rax
movq %rax, %r13
subq %rbp, %r13
jbe 0x178a5
leaq (%r12,%rbp), %rcx
cmpq %rax, %rcx
cmovbeq %r12, %r13
leaq (%rsp,%r13), %r15
addq $0x20, %r15
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %r15, %rcx
callq *0x10(%rbx)
testl %eax, %eax
je 0x178d1
leaq 0x4(%rsp), %rdi
leaq 0x18(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %r8
movq %r15, %r9
callq 0x1766a
addq %r13, %rbp
jmp 0x1784f
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rbx
movq %rbx, %rdx
callq 0x1773d
movq (%rbx), %rax
addq $0x4028, %rsp           # imm = 0x4028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x41c0
movq %rax, %rbx
leaq 0x39fce(%rip), %rsi     # 0x518b1
movq %rax, %rdi
callq 0x4120
movq 0x5d6f6(%rip), %rsi     # 0x74fe8
movq 0x5d6bf(%rip), %rdx     # 0x74fb8
movq %rbx, %rdi
callq 0x45b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4290
movq %r14, %rdi
callq 0x4600
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::TSingleStreamRLE0::appendByZeroLen(unsigned long long)
void TSingleStreamRLE0::appendByZeroLen(hpatch_StreamPos_t appendZeroLen){
        if (appendZeroLen){
            TLastType lastType=getLastType(*this);
            if (lastType==lastType_v)
                _out_uncompressData(*this);
            len0+=appendZeroLen;
        }
    }

// Assembly:
testq %rsi, %rsi
je 0x17940
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x17e09
cmpl $0x1, %eax
jne 0x17935
movq %r14, %rdi
callq 0x17e9f
addq %rbx, 0x30(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::TSingleStreamRLE0::append(unsigned char const*, unsigned char const*)
void TSingleStreamRLE0::append(const unsigned char* appendData,const unsigned char* appendData_end){
        TLastType lastType=getLastType(*this);
        while (appendData!=appendData_end) {
            unsigned char v;
            size_t sLen0=0;
            do {
                v=*appendData++;
                if (0==v)
                    ++sLen0;
                else
                    break;
            }while (appendData!=appendData_end);
            if (sLen0>0){
                if (lastType==lastType_v)
                    _out_uncompressData(*this);
                len0+=sLen0;
                lastType=lastType_same;
                if (v==0)
                    break;//appendData==appendData_end
            }
            if (lastType==lastType_same)
                _out_0Data(*this);
            uncompressData.push_back(v);
            lastType=lastType_v;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r14
callq 0x17e09
leaq 0x18(%r14), %r15
cmpq %rbx, %r13
je 0x179cf
movq %rbx, %rdx
subq %r13, %rdx
xorl %ebp, %ebp
movq %r13, %r12
movb (%r13), %cl
movb %cl, 0x7(%rsp)
testb %cl, %cl
jne 0x1798b
leaq 0x1(%r12), %r13
incq %rbp
cmpq %rbx, %r13
jne 0x1796c
movq %rdx, %rbp
testq %rbp, %rbp
je 0x179b3
cmpl $0x1, %eax
jne 0x179a1
movq %r14, %rdi
callq 0x17e9f
movb 0x7(%rsp), %cl
addq %rbp, 0x30(%r14)
testb %cl, %cl
je 0x179cf
movq %r14, %rdi
callq 0x17f37
jmp 0x179b7
testl %eax, %eax
je 0x179a9
incq %r12
movq %r15, %rdi
leaq 0x7(%rsp), %rsi
callq 0x17f84
movq %r12, %r13
pushq $0x1
popq %rax
jmp 0x1795f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::TSingleStreamRLE0::append(hpatch_TStreamInput const*)
void TSingleStreamRLE0::append(const hpatch_TStreamInput* appendData){
        TByte buf[kStepSize];
        hpatch_StreamPos_t readPos=0;
        while (readPos<appendData->streamSize){
            size_t len=kStepSize;
            if (len+readPos>appendData->streamSize)
                len=(size_t)(appendData->streamSize-readPos);
            if (!appendData->read(appendData,readPos,buf,buf+len))
                throw std::runtime_error("TSingleStreamRLE0::append() appendData->read()");
            append(buf,buf+len);
            readPos+=len;
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4018, %rsp           # imm = 0x4018
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
xorl %r15d, %r15d
movl $0x4000, %ebp           # imm = 0x4000
leaq 0x10(%rsp), %r12
movq 0x8(%rbx), %rax
movq %rax, %r14
subq %r15, %r14
jbe 0x17a4b
leaq (%r15,%rbp), %rcx
cmpq %rax, %rcx
cmovbeq %rbp, %r14
leaq (%rsp,%r14), %r13
addq $0x10, %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq *0x10(%rbx)
testl %eax, %eax
je 0x17a5d
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x17942
addq %r14, %r15
jmp 0x17a04
addq $0x4018, %rsp           # imm = 0x4018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x41c0
movq %rax, %rbx
leaq 0x39e76(%rip), %rsi     # 0x518e5
movq %rax, %rdi
callq 0x4120
movq 0x5d56a(%rip), %rsi     # 0x74fe8
movq 0x5d533(%rip), %rdx     # 0x74fb8
movq %rbx, %rdi
callq 0x45b0
movq %rax, %r14
movq %rbx, %rdi
callq 0x4290
movq %r14, %rdi
callq 0x4600
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::TSingleStreamRLE0::finishAppend()
void TSingleStreamRLE0::finishAppend(){
        if ((fixed_code.empty())||(len0>0))
            _out_0Data(*this);
        if (!uncompressData.empty())
            _out_uncompressData(*this);
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
cmpq 0x8(%rdi), %rax
je 0x17ab4
cmpq $0x0, 0x30(%rbx)
je 0x17abc
movq %rbx, %rdi
callq 0x17f37
movq 0x18(%rbx), %rax
cmpq 0x20(%rbx), %rax
je 0x17acf
movq %rbx, %rdi
popq %rbx
jmp 0x17e9f
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::(anonymous namespace)::TStreamRLE::endSame()
inline void endSame(){
            size_t sign=((size_t)(253-(size_t)(TByte)(sameCur-1))) >> (sizeof(size_t)*8-1);
            if (sameCount+sign>kRleMinSameSize){//can rle
                endNoSame();
                rle_pushSame(ctrlBuf,codeBuf,sameCur,sameCount);
                sameCount=0;
            }else{
                notSameCount+=sameCount;
                while (sameCount--)
                    codeBuf.push_back(sameCur);
            }
        }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x10(%rdi), %al
incb %al
cmpb $0x2, %al
movq 0x18(%rdi), %rax
movq %rax, %rcx
adcq $0x0, %rcx
cmpq 0x28(%rdi), %rcx
jbe 0x17b1a
movq %rbx, %rdi
callq 0x17b3e
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movzbl 0x10(%rbx), %edx
movq 0x18(%rbx), %rcx
callq 0x17b8d
andq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x10(%rbx), %r14
addq %rax, 0x20(%rbx)
subq $0x1, %rax
movq %rax, 0x18(%rbx)
jb 0x17b12
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x17f84
movq 0x18(%rbx), %rax
jmp 0x17b22
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::(anonymous namespace)::TStreamRLE::endNoSame()
inline void endNoSame(){
            if (notSameCount>1){
                rle_pushNotSameCtrl(ctrlBuf,notSameCount);
                notSameCount=0;
            }else if (notSameCount==1){
                notSameCount=0;
                TByte cur=codeBuf.back();
                codeBuf.pop_back();
                rle_pushSame(ctrlBuf,codeBuf,cur,1);
            }
        }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rsi
cmpq $0x2, %rsi
jb 0x17b64
movq (%rbx), %rdi
decq %rsi
pushq $0x3
popq %rdx
pushq $0x2
popq %rcx
callq 0x17c51
andq $0x0, 0x20(%rbx)
jmp 0x17b8b
cmpq $0x1, %rsi
jne 0x17b8b
andq $0x0, 0x20(%rbx)
movq 0x8(%rbx), %rsi
movq 0x8(%rsi), %rax
movzbl -0x1(%rax), %edx
decq %rax
movq %rax, 0x8(%rsi)
movq (%rbx), %rdi
pushq $0x1
popq %rcx
popq %rbx
jmp 0x17b8d
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::(anonymous namespace)::rle_pushSame(std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned char, unsigned long long)
static void rle_pushSame(std::vector<TByte>& out_ctrl,std::vector<TByte>& out_code,
                             TByte cur,TUInt count){
        assert(count>0);
        while (count>kMaxBytesRleLen){
            rle_pushSame(out_ctrl,out_code,cur,kMaxBytesRleLen);
            count-=kMaxBytesRleLen;
        }
        enum TByteRleType type;
        if (cur==0)
            type=kByteRleType_rle0;
        else if (cur==255)
            type=kByteRleType_rle255;
        else
            type=kByteRleType_rle;
        const TUInt packCount=(TUInt)(count-1);
        packUIntWithTag(out_ctrl,packCount,type,kByteRleType_bit);
        if (type==kByteRleType_rle)
            out_code.push_back(cur);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %r12d
movb %r12b, 0xf(%rsp)
testq %rcx, %rcx
je 0x17c34
movq %rcx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movzbl %r12b, %ebp
movq %rbx, %rax
shrq $0x1f, %rax
je 0x17bdb
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x17b8d
addq $-0x7fffffff, %rbx      # imm = 0x80000001
jmp 0x17bb7
testb %r12b, %r12b
je 0x17beb
cmpl $0xff, %ebp
jne 0x17c07
pushq $0x1
popq %rbp
decq %rbx
pushq $0x2
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x17c51
decq %rbx
pushq $0x2
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
movl %ecx, %edx
callq 0x17c51
leaq 0xf(%rsp), %rsi
movq %r15, %rdi
callq 0x17f84
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x39dd6(%rip), %rdi     # 0x51a11
leaq 0x39d17(%rip), %rsi     # 0x51959
leaq 0x39dd0(%rip), %rcx     # 0x51a19
pushq $0x2b
popq %rdx
callq 0x4230
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::_out_uncompressData_codeSize(unsigned long long)
inline hpatch_StreamPos_t _out_uncompressData_codeSize(hpatch_StreamPos_t dataSize){
        hpatch_StreamPos_t codeSize=0;
        hpatch_StreamPos_t saved=0;
        while (dataSize-saved>kMaxBytesRleLen){
            codeSize+=hpatch_packUInt_size(kMaxBytesRleLen);
            codeSize+=kMaxBytesRleLen;
            codeSize+=hpatch_packUInt_size(0);
            saved+=kMaxBytesRleLen;
        }
        codeSize+=hpatch_packUInt_size(dataSize-saved);
        codeSize+=(hpatch_StreamPos_t)(dataSize-saved);
        return codeSize;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %ebx, %ebx
movq %r14, %rax
shrq $0x1f, %rax
je 0x17e84
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
xorl %esi, %esi
callq 0x3a58c
movl %eax, %r15d
xorl %edi, %edi
xorl %esi, %esi
callq 0x3a58c
movl %eax, %eax
addq %r15, %rbx
addq %rax, %rbx
addq $0x7fffffff, %rbx       # imm = 0x7FFFFFFF
addq $-0x7fffffff, %r14      # imm = 0x80000001
jmp 0x17e4b
movq %r14, %rdi
xorl %esi, %esi
callq 0x3a58c
movl %eax, %eax
addq %r14, %rbx
addq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::_out_uncompressData(hdiff_private::TSingleStreamRLE0&)
inline void _out_uncompressData(TSingleStreamRLE0& self){
        size_t saved=0;
        while (self.uncompressData.size()-saved>kMaxBytesRleLen){
            packUInt(self.fixed_code, kMaxBytesRleLen);
            pushBack(self.fixed_code, self.uncompressData.data()+saved,self.uncompressData.data()+saved+kMaxBytesRleLen);
            packUInt(self.fixed_code,0);
            saved+=kMaxBytesRleLen;
        }
        packUInt(self.fixed_code, self.uncompressData.size()-saved);
        pushBack(self.fixed_code, self.uncompressData.data()+saved,self.uncompressData.data()+self.uncompressData.size());
        self.uncompressData.clear();
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r14d, %r14d
movq $-0x7fffffff, %r12      # imm = 0x80000001
movq 0x20(%rbx), %rsi
subq 0x18(%rbx), %rsi
addq %r14, %rsi
movq %rsi, %rax
shrq $0x1f, %rax
je 0x17f02
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq %rbx, %rdi
callq 0x17cdf
movq 0x18(%rbx), %rdx
addq %r15, %rdx
leaq (%rdx,%r12), %rsi
movq %rbx, %rdi
callq 0x17d6d
movq %rbx, %rdi
callq 0x17d7c
addq %r12, %r14
addq $0x7fffffff, %r15       # imm = 0x7FFFFFFF
jmp 0x17eba
movq %rbx, %rdi
callq 0x17cdf
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
subq %r14, %rsi
movq %rbx, %rdi
callq 0x17d6d
movq 0x18(%rbx), %rax
cmpq %rax, 0x20(%rbx)
je 0x17f2b
movq %rax, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::_out_0Data(hdiff_private::TSingleStreamRLE0&)
inline void _out_0Data(TSingleStreamRLE0& self){
        hpatch_StreamPos_t saved=0;
        while (self.len0-saved>kMaxBytesRleLen){
            packUInt(self.fixed_code,kMaxBytesRleLen);
            packUInt(self.fixed_code,0);
            saved+=kMaxBytesRleLen;
        }
        packUInt(self.fixed_code,(hpatch_StreamPos_t)(self.len0-saved));
        self.len0=0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x30(%rbx), %rsi
addq %r14, %rsi
movq %rsi, %rax
shrq $0x1f, %rax
je 0x17f6f
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movq %rbx, %rdi
callq 0x17cdf
movq %rbx, %rdi
callq 0x17d7c
addq $-0x7fffffff, %r14      # imm = 0x80000001
jmp 0x17f41
movq %rbx, %rdi
callq 0x17540
andq $0x0, 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/bytes_rle.cpp
// Function: hdiff_private::_out_0Data_codeSize(unsigned long long)
inline hpatch_StreamPos_t _out_0Data_codeSize(hpatch_StreamPos_t len0){
        hpatch_StreamPos_t codeSize=0;
        hpatch_StreamPos_t saved=0;
        while (len0-saved>kMaxBytesRleLen){
            codeSize+=hpatch_packUInt_size(kMaxBytesRleLen);
            codeSize+=hpatch_packUInt_size(0);
            saved+=kMaxBytesRleLen;
        }
        codeSize+=hpatch_packUInt_size((hpatch_StreamPos_t)(len0-saved));
        return codeSize;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebx, %ebx
movq %r14, %rax
shrq $0x1f, %rax
je 0x17fd8
movl $0x7fffffff, %edi       # imm = 0x7FFFFFFF
xorl %esi, %esi
callq 0x3a58c
movl %eax, %eax
addq %rax, %rbx
xorl %edi, %edi
xorl %esi, %esi
callq 0x3a58c
movl %eax, %eax
addq %rax, %rbx
addq $-0x7fffffff, %r14      # imm = 0x80000001
jmp 0x17fa7
movq %r14, %rdi
xorl %esi, %esi
callq 0x3a58c
movl %eax, %eax
addq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: hdiff_private::TSuffixString::clear_cache()
void TSuffixString::clear_cache(){
#if (_SSTRING_FAST_MATCH>0)
    if (m_isUsedFastMatch) m_fastMatch.clear();
#endif
    if (m_cached2char_range){
        delete [](TChar*)m_cached2char_range;
        m_cached2char_range=0;
    }
    memset(&m_cached1char_range[0],0,sizeof(void*)*(256+1));
    m_cached_SA_begin=0;
    m_cached_SA_end=0;
    m_lower_bound=(t_lower_bound_func)_lower_bound_TInt32;//safe
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x40(%rdi)
jne 0x18131
leaq 0x48(%rbx), %rdi
callq 0x18b50
movq 0x878(%rbx), %rdi
testq %rdi, %rdi
je 0x1814a
callq 0x4400
andq $0x0, 0x878(%rbx)
leaq 0x60(%rbx), %rdi
movl $0x818, %edx            # imm = 0x818
xorl %esi, %esi
callq 0x41f0
leaq 0x5ac(%rip), %rax       # 0x1870d
movq %rax, 0x880(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: hdiff_private::TSuffixString::resetSuffixString(unsigned char const*, unsigned char const*, unsigned long)
void TSuffixString::resetSuffixString(const TChar* src_begin,const TChar* src_end,size_t threadNum){
    assert(src_begin<=src_end);
    m_src_begin=src_begin;
    m_src_end=src_end;
    if (isUseLargeSA()){
        _clearVector(m_SA_limit);
        _suffixString_create(m_src_begin,m_src_end,m_SA_large,threadNum);
    }else{
        assert(sizeof(TInt32)==4);
        _clearVector(m_SA_large);
        _suffixString_create(m_src_begin,m_src_end,m_SA_limit,threadNum);
    }
    build_cache(threadNum);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpq %rdx, %rsi
ja 0x182c7
movq %rcx, %rbx
movq %rdi, %r14
movq %rsi, (%rdi)
movq %rdx, 0x8(%rdi)
subq %rsi, %rdx
shrq $0x1f, %rdx
je 0x18277
leaq 0x10(%r14), %rdi
callq 0x1837e
movq (%r14), %r12
movq 0x8(%r14), %r15
leaq 0x28(%r14), %r13
movq %r15, %rsi
subq %r12, %rsi
movq %r13, %rdi
callq 0x18ce6
subq %r12, %r15
je 0x182b3
movq (%r13), %rsi
movq %r12, %rdi
movq %r15, %rdx
movl %ebx, %ecx
callq 0x216dc
testl %eax, %eax
je 0x182b3
pushq $0x10
popq %rdi
callq 0x41c0
movq %rax, %rbx
leaq 0x3991a(%rip), %rsi     # 0x51b84
movq %rax, %rdi
callq 0x4120
jmp 0x18300
leaq 0x28(%r14), %rdi
callq 0x183a8
movq (%r14), %r12
movq 0x8(%r14), %r15
leaq 0x10(%r14), %r13
movq %r15, %rsi
subq %r12, %rsi
movq %r13, %rdi
callq 0x18ed2
subq %r12, %r15
je 0x182b3
movq (%r13), %rsi
movq %r12, %rdi
movl %r15d, %edx
movl %ebx, %ecx
callq 0x25cec
testl %eax, %eax
jne 0x182e6
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x183d2
leaq 0x3980a(%rip), %rdi     # 0x51ad8
leaq 0x39816(%rip), %rsi     # 0x51aeb
leaq 0x3984d(%rip), %rcx     # 0x51b29
movl $0x114, %edx            # imm = 0x114
callq 0x4230
pushq $0x10
popq %rdi
callq 0x41c0
movq %rax, %rbx
leaq 0x3988c(%rip), %rsi     # 0x51b84
movq %rax, %rdi
callq 0x4120
movq 0x5cce1(%rip), %rsi     # 0x74fe8
movq 0x5ccaa(%rip), %rdx     # 0x74fb8
movq %rbx, %rdi
callq 0x45b0
jmp 0x18318
movq %rax, %r14
movq %rbx, %rdi
callq 0x4290
movq %r14, %rdi
callq 0x4600
nop
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: hdiff_private::TSuffixString::clear()
void TSuffixString::clear(){
    clear_cache();
    m_src_begin=0;
    m_src_end=0;
    _clearVector(m_SA_limit);
    _clearVector(m_SA_large);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x1811e
leaq 0x10(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
callq 0x1837e
addq $0x28, %rbx
movq %rbx, %rdi
popq %rbx
jmp 0x183a8
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: hdiff_private::TSuffixString::lower_bound(unsigned char const*, unsigned char const*) const
TInt TSuffixString::lower_bound(const TChar* str,const TChar* str_end)const{
    //not use any cached range table
    //return m_lower_bound(m_cached_SA_begin,m_cached_SA_end,
    //                     str,str_end,m_src_begin,m_src_end,m_cached_SA_begin,0);
#if (_SSTRING_FAST_MATCH>0)
    if (m_isUsedFastMatch&&(!m_fastMatch.isHit(TFastMatchForSString::getHash(str))))
        return -1;
    #define kMinStrLen _SSTRING_FAST_MATCH
#else
    //assert(str_end-str>=2);
    #define kMinStrLen 2
#endif
    if ((kMinStrLen>=2)&(m_cached2char_range!=0)){
        size_t cc=((size_t)str[1]) | (((size_t)str[0])<<8);
        size_t r0,r1;
        if (isUseLargeSA()){
            r0=((TInt*)m_cached2char_range)[cc]*sizeof(TInt);
            r1=((TInt*)m_cached2char_range)[cc+1]*sizeof(TInt);
        }else{
            r0=((TInt32*)m_cached2char_range)[cc]*sizeof(TInt32);
            r1=((TInt32*)m_cached2char_range)[cc+1]*sizeof(TInt32);
        }
        return m_lower_bound((TChar*)m_cached_SA_begin+r0,(TChar*)m_cached_SA_begin+r1,
                             str,str_end,m_src_begin,m_src_end,m_cached_SA_begin,2);
    }else if (kMinStrLen>0){
        size_t c=str[0];
        return m_lower_bound(m_cached1char_range[c],m_cached1char_range[c+1],
                             str,str_end,m_src_begin,m_src_end,m_cached_SA_begin,1);
    }else{
        return -1;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpb $0x1, 0x40(%rdi)
jne 0x1866f
leaq 0x48(%rbx), %r12
movq %r15, %rdi
callq 0x18a8c
movq %r12, %rdi
movl %eax, %esi
callq 0x18bd4
testb %al, %al
je 0x186ce
movq 0x878(%rbx), %rax
testq %rax, %rax
je 0x186ac
movzwl (%r15), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
movq (%rbx), %r8
movq 0x8(%rbx), %r9
movq %r9, %rdx
subq %r8, %rdx
shrq $0x1f, %rdx
je 0x186d7
movq (%rax,%rcx,8), %rdi
movq 0x8(%rax,%rcx,8), %rsi
shlq $0x3, %rdi
shlq $0x3, %rsi
jmp 0x186e8
movzbl (%r15), %eax
movq 0x70(%rbx,%rax,8), %rdi
movq 0x78(%rbx,%rax,8), %rsi
movq (%rbx), %r8
movq 0x8(%rbx), %r9
movq %r15, %rdx
movq %r14, %rcx
pushq $0x1
pushq 0x60(%rbx)
jmp 0x186fb
pushq $-0x1
popq %rax
addq $0x8, %rsp
jmp 0x18705
movslq (%rax,%rcx,4), %rdi
shlq $0x2, %rdi
movslq 0x4(%rax,%rcx,4), %rsi
shlq $0x2, %rsi
movq 0x60(%rbx), %rax
addq %rax, %rdi
addq %rax, %rsi
movq %r15, %rdx
movq %r14, %rcx
pushq $0x2
pushq %rax
callq *0x880(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/private_diff/suffix_string.cpp
// Function: void hdiff_private::_filter_insert<true>(hdiff_private::TBloomFilter<unsigned int>*, unsigned char const*, unsigned char const*)
static void _filter_insert(TBloomFilter<TFastMatchForSString::THash>* filter,
                               const TChar* src_begin,const TChar* src_end){
        const TChar* cur = src_begin;
        TFastMatchForSString::THash h=TFastMatchForSString::getHash(cur);
        cur+=TFastMatchForSString::kFMMinStrSize;
        do {
    #if (_IS_USED_MULTITHREAD)
            if (isMT)
                filter->insert_MT(h);
            else
    #endif
                filter->insert(h);
            if (cur<src_end)
                h=TFastMatchForSString::rollHash(h,cur++);
            else
                break;
        } while (true);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x18a8c
movl %eax, %ebp
addq $0x5, %r15
movq %r14, %rdi
movl %ebp, %esi
callq 0x19158
cmpq %rbx, %r15
jae 0x1894d
leaq 0x1(%r15), %r12
movl %ebp, %edi
movq %r15, %rsi
callq 0x191ba
movl %eax, %ebp
movq %r12, %r15
jmp 0x18929
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq