// File: /workspace/github_cpp_makefile_star2_O2/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: create_lite_diff(unsigned char const*, unsigned char const*, unsigned char const*, unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>&, hdiffi_TCompress const*, int, bool, ILiteDiffListener*, unsigned long)
void create_lite_diff(const unsigned char* newData,const unsigned char* newData_end,
                      const unsigned char* oldData,const unsigned char* oldData_end,
                      std::vector<hpi_byte>& out_lite_diff,const hdiffi_TCompress* compressPlugin,
                      int kMinSingleMatchScore,bool isUseBigCacheMatch,
                      ILiteDiffListener* listener,size_t threadNum){
    static const int _kMatchScore_optim4bin=6;
    TDiffData diff;
    std::vector<TOldCover> covers;
    get_diff(newData,newData_end,oldData,oldData_end,diff,covers,
             kMinSingleMatchScore-_kMatchScore_optim4bin,isUseBigCacheMatch,listener,0,threadNum);
    size_t oldPosEnd=0;
    size_t newPosEnd=0;
    if (!covers.empty()){
        const TOldCover& c=covers.back();
        oldPosEnd=c.oldPos+c.length;
        newPosEnd=c.newPos+c.length;
    }
    const size_t newSize=newData_end-newData;
    if (newPosEnd<newSize)
        covers.push_back(TOldCover(oldPosEnd,newSize,0));

    TInlpacePatchSets inlpacePatchSets={};
    if (listener&&listener->getInplacePatchExtraSafeSize){
        if (listener->getInplacePatchExtraSafeSize(listener,&inlpacePatchSets.extraSafeSize))
            inlpacePatchSets.isInplacePatchByExtra=true;
    }
    serialize_lite_diff(diff,covers,out_lite_diff,compressPlugin,inlpacePatchSets);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r9, 0xa0(%rsp)
movq %r8, 0xa8(%rsp)
movq %rsi, %rbx
movq %rdi, %r12
movq 0x120(%rsp), %r13
movb 0x118(%rsp), %al
movq 0x128(%rsp), %r10
movl 0x110(%rsp), %r11d
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r9
movaps %xmm0, (%r9)
andq $0x0, 0x10(%r9)
addl $-0x6, %r11d
movzbl %al, %eax
leaq 0xb8(%rsp), %r8
pushq $0x1
pushq %r10
pushq $0x0
pushq %r13
pushq %rax
pushq %r11
callq 0xbbbd
addq $0x30, %rsp
movq 0x18(%rsp), %r15
cmpq %r15, 0x10(%rsp)
je 0xe459
movq -0x8(%r15), %rax
movq -0x18(%r15), %r14
addq %rax, %r14
addq -0x10(%r15), %rax
jmp 0xe45e
xorl %r14d, %r14d
xorl %eax, %eax
subq %r12, %rbx
pushq $0x18
popq %r12
cmpq %rbx, %rax
jae 0xe52c
cmpq 0x20(%rsp), %r15
je 0xe48a
movq %r14, (%r15)
movq %rbx, 0x8(%r15)
andq $0x0, 0x10(%r15)
addq $0x18, %r15
jmp 0xe527
leaq 0x41018(%rip), %rdx     # 0x4f4a9
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
callq 0x1009c
movq %rax, 0x30(%rsp)
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %r12
movq 0x30(%rsp), %rdi
callq 0x100ea
movq %rax, %rbp
movq %r15, %rax
subq %r13, %rax
movq %r14, (%rbp,%rax)
movq %rbx, 0x8(%rbp,%rax)
andq $0x0, 0x10(%rbp,%rax)
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x1016b
leaq 0x18(%rax), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1016b
movq %rax, %r15
movq 0x20(%rsp), %rax
subq %r13, %rax
cqto
pushq $0x18
popq %r12
idivq %r12
movq %r13, %rdi
movq %rax, %rsi
callq 0x10126
movq %rbp, 0x10(%rsp)
imulq $0x18, 0x30(%rsp), %rax
addq %rbp, %rax
movq %rax, 0x20(%rsp)
movq 0x120(%rsp), %r13
movq %r15, 0x18(%rsp)
andq $0x0, 0x8(%rsp)
testq %r13, %r13
je 0xe557
movq 0x40(%r13), %rax
testq %rax, %rax
je 0xe557
leaq 0xc(%rsp), %rsi
movq %r13, %rdi
callq *%rax
testb %al, %al
je 0xe561
movb $0x1, 0x8(%rsp)
movb $0x1, %al
jmp 0xe565
movl $0x0, 0x4(%rsp)
jmp 0xe569
movb 0x8(%rsp), %al
movl %eax, 0x4(%rsp)
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
cqto
idivq %r12
andq $0x0, 0x90(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
leaq 0x40(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rax, 0xb0(%rsp)
movq %rax, %rsi
callq 0x11d0b
movq 0xc0(%rsp), %rax
subq 0xb8(%rsp), %rax
movq %rax, 0x38(%rsp)
xorl %r13d, %r13d
leaq 0x40(%rsp), %rdi
xorl %ebx, %ebx
xorl %r15d, %r15d
cmpq 0xb0(%rsp), %r13
je 0xe72c
movq 0x10(%rsp), %r14
imulq $0x18, %r13, %r12
movq 0x10(%r14,%r12), %rsi
callq 0x11d0b
addq %r12, %r14
movq 0x10(%r14), %rsi
leaq 0x80(%rsp), %rdi
callq 0x843c
movq 0xb8(%rsp), %rcx
addq 0x8(%r14), %rcx
movq 0xc8(%rsp), %rdx
addq (%r14), %rdx
xorl %esi, %esi
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rdi
subq %rax, %rdi
cmpq %rdi, %rsi
jae 0xe642
movb (%rcx,%rsi), %dil
subb (%rdx,%rsi), %dil
movb %dil, (%rax,%rsi)
incq %rsi
jmp 0xe619
movq %r13, 0x30(%rsp)
movq 0x10(%r14), %r13
movq %r13, %rcx
negq %rcx
pushq $-0x1
popq %rdx
leaq (%rcx,%rdx), %rsi
cmpq $-0x1, %rsi
je 0xe66e
leaq 0x1(%rdx), %r12
cmpb $0x0, 0x1(%rax,%rdx)
movq %r12, %rdx
je 0xe654
jmp 0xe671
movq %r13, %r12
movq (%r14), %rax
movq %rax, %rcx
subq %r15, %rcx
negq %rcx
movq %rax, %rsi
subq %r15, %rsi
cmovbq %rcx, %rsi
movq %rsi, %rcx
shrq $0x20, %rcx
jne 0xe8a3
xorl %ecx, %ecx
cmpq %r13, %r12
setae %cl
leal (%rcx,%rcx), %edi
cmpq %rax, %r15
leal 0x1(%rcx,%rcx), %edx
cmovbel %edi, %edx
leaq 0x40(%rsp), %rbp
movq %rbp, %rdi
pushq $0x2
popq %rcx
callq 0x11aad
movq 0x8(%r14), %r15
movq %r15, %rsi
subq %rbx, %rsi
movq %rbp, %rdi
callq 0x11d0b
cmpq %rbx, %r15
je 0xe6ee
movq 0xb8(%rsp), %rax
addq %rax, %rbx
addq %rax, %r15
leaq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x11c20
cmpq %r13, %r12
jae 0xe70c
movq 0x80(%rsp), %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0x11c20
movq 0x10(%r14), %rbx
movq (%r14), %r15
addq %rbx, %r15
addq 0x8(%r14), %rbx
movq 0x30(%rsp), %r13
incq %r13
leaq 0x40(%rsp), %rdi
jmp 0xe5cb
cmpq %rbx, 0x38(%rsp)
jne 0xe8d3
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %r14
movaps %xmm0, (%r14)
andq $0x0, 0x10(%r14)
movq 0xa0(%rsp), %rbx
movq (%rbx), %rdx
leaq 0x40(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x11c2f
movq 0xa8(%rsp), %r15
leaq 0x3(%rsp), %rsi
movb $0x68, (%rsi)
movq %r15, %rdi
callq 0x13ab6
leaq 0x3(%rsp), %rsi
movb $0x49, (%rsi)
movq %r15, %rdi
callq 0x13ab6
movq 0x60(%rsp), %rax
cmpq 0x68(%rsp), %rax
je 0xe79c
movb 0x8(%rbx), %al
jmp 0xe79e
xorl %eax, %eax
leaq 0x3(%rsp), %rsi
movb %al, (%rsi)
movq %r15, %rdi
callq 0x13ab6
movq 0x60(%rsp), %rax
movq 0x48(%rsp), %rcx
subq 0x40(%rsp), %rcx
xorl %ebx, %ebx
cmpq 0x68(%rsp), %rax
cmovneq %rcx, %rbx
movq 0x38(%rsp), %rdi
callq 0x11d67
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11d67
testb $0x1, 0x4(%rsp)
movl $0x80, %ecx
pushq $0x40
popq %rdx
cmovnel %ecx, %edx
orb %dl, %bpl
shlb $0x3, %al
orb %bpl, %al
leaq 0x3(%rsp), %rsi
movb %al, (%rsi)
movq %r15, %rdi
callq 0x13ab6
testb $0x1, 0x4(%rsp)
je 0xe822
movl 0xc(%rsp), %edi
callq 0x11d67
leaq 0x3(%rsp), %rsi
movb %al, (%rsi)
movq %r15, %rdi
callq 0x13ab6
movq %r15, %rdi
movq 0x38(%rsp), %rsi
callq 0x11dce
movq %r15, %rdi
movq %rbx, %rsi
callq 0x11dce
testb $0x1, 0x4(%rsp)
je 0xe84d
movl 0xc(%rsp), %esi
movq %r15, %rdi
callq 0x11dce
movq 0x60(%rsp), %rax
cmpq 0x68(%rsp), %rax
cmoveq %r12, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x11b3b
leaq 0x60(%rsp), %rdi
callq 0x8b88
leaq 0x40(%rsp), %rdi
callq 0x8b88
leaq 0x80(%rsp), %rdi
callq 0x8b88
leaq 0x10(%rsp), %rdi
callq 0xc678
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x41c0
movq %rax, %r14
leaq 0x42c6a(%rip), %rsi     # 0x5151f
movq %rax, %rdi
callq 0x4120
movq 0x66724(%rip), %rsi     # 0x74fe8
movq 0x666ed(%rip), %rdx     # 0x74fb8
movq %r14, %rdi
callq 0x45b0
pushq $0x10
popq %rdi
callq 0x41c0
movq %rax, %r14
leaq 0x42c1f(%rip), %rsi     # 0x51504
movq %rax, %rdi
callq 0x4120
movq 0x666f4(%rip), %rsi     # 0x74fe8
movq 0x666bd(%rip), %rdx     # 0x74fb8
movq %r14, %rdi
callq 0x45b0
jmp 0xe917
jmp 0xe917
jmp 0xe942
jmp 0xe92f
jmp 0xe91e
jmp 0xe91e
jmp 0xe91e
jmp 0xe91e
jmp 0xe91e
jmp 0xe942
movq %rax, %rbx
jmp 0xe95c
jmp 0xe91e
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x8b88
jmp 0xe945
jmp 0xe942
movq %rax, %rbx
movq %r14, %rdi
callq 0x4290
jmp 0xe945
jmp 0xe942
jmp 0xe942
jmp 0xe942
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x8b88
leaq 0x80(%rsp), %rdi
callq 0x8b88
leaq 0x10(%rsp), %rdi
callq 0xc678
movq %rbx, %rdi
callq 0x4600