// File: /workspace/github_cpp_makefile_star2_O3/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, 0xa8(%rsp)
movq %r8, 0xb0(%rsp)
movq %rsi, %r15
movq %rdi, %r13
movq 0x120(%rsp), %rbp
movb 0x118(%rsp), %sil
movq 0x128(%rsp), %r10
movl 0x110(%rsp), %eax
xorl %r11d, %r11d
leaq 0x20(%rsp), %r9
movq %r11, 0x10(%r9)
xorps %xmm0, %xmm0
movaps %xmm0, (%r9)
addl $-0x6, %eax
movzbl %sil, %ebx
leaq 0xb8(%rsp), %r8
movq %r15, %rsi
pushq $0x1
pushq %r10
pushq %r11
pushq %rbp
pushq %rbx
pushq %rax
callq 0xd8b0
addq $0x30, %rsp
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %rbx
cmpq %rbx, %r12
je 0x10f43
movq -0x8(%rbx), %rax
movq -0x18(%rbx), %r14
addq %rax, %r14
addq -0x10(%rbx), %rax
jmp 0x10f48
xorl %r14d, %r14d
xorl %eax, %eax
subq %r13, %r15
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
cmpq %r15, %rax
jae 0x1106e
cmpq 0x30(%rsp), %rbx
je 0x10f82
movq %r14, (%rbx)
movq %r15, 0x8(%rbx)
movq $0x0, 0x10(%rbx)
addq $0x18, %rbx
movq %rbx, 0x28(%rsp)
jmp 0x1106e
movq %rbx, %r13
subq %r12, %r13
movabsq $0x7ffffffffffffff8, %rax # imm = 0x7FFFFFFFFFFFFFF8
cmpq %rax, %r13
je 0x11649
movq %r13, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq $0x1, %rax
movq %rax, %rcx
adcq $0x0, %rcx
leaq (%rcx,%rax), %rdi
movabsq $0x555555555555555, %rdx # imm = 0x555555555555555
cmpq %rdx, %rdi
cmovaeq %rdx, %rdi
addq %rax, %rcx
cmovbq %rdx, %rdi
movq %rdi, 0x78(%rsp)
callq 0x13364
movq %rax, %rbp
movq %r14, (%rax,%r13)
movq %r15, 0x8(%rax,%r13)
movq $0x0, 0x10(%rax,%r13)
movq %rax, %r14
cmpq %rbx, %r12
je 0x11020
movq %rbp, %r14
movq %r12, %rax
movups (%rax), %xmm0
movups %xmm0, (%r14)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%r14)
addq $0x18, %rax
addq $0x18, %r14
cmpq %rbx, %rax
jne 0x11004
addq $0x18, %r14
testq %r12, %r12
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
je 0x11043
movq 0x30(%rsp), %rsi
subq %r12, %rsi
movq %r12, %rdi
callq 0x4300
movq %rbp, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq 0x78(%rsp), %rax
leaq (%rax,%rax,2), %rax
leaq (,%rax,8), %rax
addq %rbp, %rax
movq %rax, 0x30(%rsp)
movq 0x120(%rsp), %rbp
movq $0x0, 0x18(%rsp)
testq %rbp, %rbp
je 0x1109c
movq 0x40(%rbp), %rax
testq %rax, %rax
je 0x1109c
leaq 0x1c(%rsp), %rsi
movq %rbp, %rdi
callq *%rax
testb %al, %al
je 0x110a0
movb $0x1, 0x18(%rsp)
movb $0x1, %bl
jmp 0x110a4
xorl %ebx, %ebx
jmp 0x110a4
movb 0x18(%rsp), %bl
movq 0x20(%rsp), %r14
movq 0x28(%rsp), %r15
movq %r15, %rsi
subq %r14, %rsi
sarq $0x3, %rsi
imulq %r13, %rsi
xorl %eax, %eax
movq %rax, 0x70(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movq %rsp, %rdi
movq %rax, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq %rsi, %r12
callq 0x1541b
movl %ebx, 0x84(%rsp)
movq 0xc0(%rsp), %rbx
subq 0xb8(%rsp), %rbx
cmpq %r14, %r15
je 0x112be
cmpq $0x1, %r12
adcq $0x0, %r12
movq %r12, 0x78(%rsp)
xorl %r12d, %r12d
xorl %ebp, %ebp
xorl %r14d, %r14d
movq 0x20(%rsp), %r15
leaq (%r14,%r14,2), %r13
movq 0x10(%r15,%r13,8), %rsi
movq %rsp, %rdi
callq 0x1541b
leaq (%r15,%r13,8), %r15
movq 0x10(%r15), %rsi
leaq 0x60(%rsp), %rdi
callq 0x9b50
movq 0x60(%rsp), %rax
cmpq %rax, 0x68(%rsp)
je 0x11180
movq 0xb8(%rsp), %rcx
addq 0x8(%r15), %rcx
movq 0xc8(%rsp), %rdx
addq (%r15), %rdx
xorl %esi, %esi
movb (%rcx,%rsi), %dil
subb (%rdx,%rsi), %dil
movb %dil, (%rax,%rsi)
incq %rsi
movq 0x60(%rsp), %rax
movq 0x68(%rsp), %rdi
subq %rax, %rdi
cmpq %rdi, %rsi
jb 0x1115f
movq 0x10(%r15), %rcx
testq %rcx, %rcx
je 0x1119a
cmpb $0x0, (%rax)
je 0x111a9
xorl %r13d, %r13d
movl $0x1, %eax
xorl %ecx, %ecx
jmp 0x111df
movl $0x2, %ecx
movb $0x1, %r13b
movl $0x3, %eax
jmp 0x111df
leaq -0x1(%rcx), %rdx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x111c4
leaq 0x1(%rsi), %rdi
cmpb $0x0, 0x1(%rax,%rsi)
movq %rdi, %rsi
je 0x111af
jmp 0x111c7
movq %rcx, %rdi
xorl %r13d, %r13d
cmpq %rcx, %rdi
setae %r13b
leal 0x1(,%r13,2), %eax
movl %r13d, %ecx
addl %r13d, %ecx
movq (%r15), %rsi
movq %rsi, %rdi
subq %r12, %rdi
negq %rdi
movq %rsi, %rdx
subq %r12, %rdx
cmovbq %rdi, %rdx
movq %rdx, %rdi
shrq $0x20, %rdi
jne 0x11595
cmpq %rsi, %r12
cmoval %eax, %ecx
leaq 0x88(%rsp), %r12
movq %r12, 0x40(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x93(%rsp), %rsi
movl $0x2, %r8d
callq 0x43254
testl %eax, %eax
je 0x11577
movq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rcx
movq %rsp, %rdi
movq %r12, %rdx
callq 0x9c50
movq 0x8(%r15), %r12
movq %r12, %rsi
subq %rbp, %rsi
movq %rsp, %rdi
callq 0x1541b
cmpq %rbp, %r12
je 0x11282
movq 0xb8(%rsp), %rax
addq %rax, %rbp
addq %rax, %r12
movq 0x8(%rsp), %rsi
movq %rsp, %rdi
movq %rbp, %rdx
movq %r12, %rcx
callq 0x9e38
testb %r13b, %r13b
jne 0x112a0
movq 0x60(%rsp), %rdx
movq 0x10(%r15), %rcx
addq %rdx, %rcx
movq 0x8(%rsp), %rsi
movq %rsp, %rdi
callq 0x9e38
movq 0x10(%r15), %rbp
movq (%r15), %r12
addq %rbp, %r12
addq 0x8(%r15), %rbp
incq %r14
cmpq 0x78(%rsp), %r14
jne 0x11112
jmp 0x112c0
xorl %ebp, %ebp
cmpq %rbp, %rbx
jne 0x115c7
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq 0xa8(%rsp), %r15
movq (%r15), %r14
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x88(%rsp), %rdi
callq 0x433a9
movq 0xb0(%rsp), %r13
movl 0x84(%rsp), %ebp
leaq 0x40(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x25eb1
leaq 0x88(%rsp), %rsi
movb $0x68, (%rsi)
movq %r13, %rdi
callq 0x16e2e
leaq 0x88(%rsp), %rsi
movb $0x49, (%rsi)
movq %r13, %rdi
callq 0x16e2e
movq 0x40(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0x11359
movb 0x8(%r15), %al
jmp 0x1135b
xorl %eax, %eax
leaq 0x88(%rsp), %rsi
movb %al, (%rsi)
movq %r13, %rdi
callq 0x16e2e
movq 0x8(%rsp), %r15
subq (%rsp), %r15
movq 0x40(%rsp), %rax
xorl %r12d, %r12d
cmpq 0x48(%rsp), %rax
cmovneq %r15, %r12
movq %rbx, %rax
shrq $0x20, %rax
jne 0x115f9
xorl %eax, %eax
testq %rbx, %rbx
je 0x113b3
movq %rbx, %rdx
movq %rbx, %rcx
incb %al
shrq $0x8, %rcx
cmpq $0xff, %rdx
movq %rcx, %rdx
ja 0x113a1
movq %r12, %rcx
shrq $0x20, %rcx
jne 0x11617
xorl %ecx, %ecx
testq %r12, %r12
je 0x113e0
movq %r15, %rsi
movq %r15, %rdx
shrq $0x8, %rdx
addb $0x8, %cl
cmpq $0xff, %rsi
movq %rdx, %rsi
ja 0x113cd
testb $0x1, %bpl
movl $0x80, %edx
movl $0x40, %esi
cmovnel %edx, %esi
orb %cl, %al
orb %sil, %al
leaq 0x88(%rsp), %rsi
movb %al, (%rsi)
movq %r13, %rdi
callq 0x16e2e
testb $0x1, %bpl
je 0x11440
movl 0x1c(%rsp), %ecx
xorl %eax, %eax
testq %rcx, %rcx
je 0x1142e
movq %rcx, %rdx
incb %al
shrq $0x8, %rdx
cmpq $0xff, %rcx
movq %rdx, %rcx
ja 0x1141c
leaq 0x88(%rsp), %rsi
movb %al, (%rsi)
movq %r13, %rdi
callq 0x16e2e
testq %rbx, %rbx
je 0x11472
leaq 0x88(%rsp), %r14
movb %bl, 0x88(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x16e2e
movq %rbx, %rax
shrq $0x8, %rax
cmpq $0xff, %rbx
movq %rax, %rbx
ja 0x1144d
testq %r12, %r12
je 0x114a5
leaq 0x88(%rsp), %r14
movb %r15b, 0x88(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x16e2e
movq %r15, %rax
shrq $0x8, %rax
cmpq $0xff, %r15
movq %rax, %r15
ja 0x1147f
movl 0x1c(%rsp), %eax
testl %eax, %eax
setne %cl
andb %cl, %bpl
cmpb $0x1, %bpl
jne 0x114e6
movl %eax, %ebx
leaq 0x88(%rsp), %r14
movb %bl, 0x88(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x16e2e
movq %rbx, %rax
shrq $0x8, %rax
cmpq $0x100, %rbx            # imm = 0x100
movq %rax, %rbx
jae 0x114c1
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
cmpq %rcx, %rdx
jne 0x114fe
movq (%rsp), %rdx
movq 0x8(%rsp), %rcx
movq 0x8(%r13), %rsi
movq %r13, %rdi
callq 0xa020
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x11521
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x11537
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x1154e
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x11565
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x4190
movq %rax, %r14
leaq 0x48e75(%rip), %rsi     # 0x5a400
movq %rax, %rdi
callq 0x4110
jmp 0x115b1
movl $0x10, %edi
callq 0x4190
movq %rax, %r14
leaq 0x4ae52(%rip), %rsi     # 0x5c3fb
movq %rax, %rdi
callq 0x4110
movq 0x6aa30(%rip), %rsi     # 0x7bfe8
movq 0x6a9f9(%rip), %rdx     # 0x7bfb8
movq %r14, %rdi
callq 0x4590
movl $0x10, %edi
callq 0x4190
movq %rax, %r14
leaq 0x4ae05(%rip), %rsi     # 0x5c3e0
movq %rax, %rdi
callq 0x4110
movq 0x6a9fe(%rip), %rsi     # 0x7bfe8
movq 0x6a9c7(%rip), %rdx     # 0x7bfb8
movq %r14, %rdi
callq 0x4590
movl $0x10, %edi
callq 0x4190
movq %rax, %r14
leaq 0x4ae0b(%rip), %rsi     # 0x5c418
movq %rax, %rdi
callq 0x4110
jmp 0x11633
movl $0x10, %edi
callq 0x4190
movq %rax, %r14
leaq 0x4aded(%rip), %rsi     # 0x5c418
movq %rax, %rdi
callq 0x4110
movq 0x6a9ae(%rip), %rsi     # 0x7bfe8
movq 0x6a977(%rip), %rdx     # 0x7bfb8
movq %r14, %rdi
callq 0x4590
leaq 0x48e59(%rip), %rdi     # 0x5a4a9
callq 0x41b0
jmp 0x11678
jmp 0x11678
jmp 0x11698
jmp 0x1165d
movq %rax, %rbx
movq %r14, %rdi
callq 0x4260
jmp 0x1169b
jmp 0x116b8
jmp 0x11685
jmp 0x11698
jmp 0x11698
jmp 0x11698
jmp 0x11698
jmp 0x116b8
movq %rax, %rbx
jmp 0x116e8
jmp 0x11698
jmp 0x11698
jmp 0x116b8
jmp 0x11685
movq %rax, %rbx
movq %r14, %rdi
callq 0x4260
jmp 0x116bb
jmp 0x11698
jmp 0x116b8
jmp 0x11698
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x116bb
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
jmp 0x116bb
jmp 0x116b8
jmp 0x116b8
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x116d1
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x116e8
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x116ff
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x45e0