// File: /workspace/github_cpp_makefile_star2_O1/sisong[P]ApkDiffPatch/HDiffPatch/libHDiffPatch/HDiff/diff.cpp
// Function: (anonymous namespace)::_limitCoverLenth(std::vector<(anonymous namespace)::TOldCover, std::allocator<(anonymous namespace)::TOldCover>>&, unsigned long long)
static void _limitCoverLenth(std::vector<TOldCover>& covers,hpatch_StreamPos_t kMaxLen){
        size_t csize=covers.size();
        size_t isize=0;
        for (size_t i=0;i<csize;++i){
            hpatch_StreamPos_t clen=covers[i].length;
            while (clen>kMaxLen){
                ++isize;
                _clipLenByLimit(clen,kMaxLen);
            }
        }
        if (isize==0) return;

        covers.resize(csize+isize);
        memmove(covers.data()+isize,covers.data(),sizeof(TOldCover)*csize);
        size_t insertIndex=0;
        for (size_t i=isize;i<covers.size();++i){
            hpatch_StreamPos_t clen=covers[i].length;
            while (clen>kMaxLen){
                --isize;
                hpatch_StreamPos_t clipLen=_clipLenByLimit(clen,kMaxLen);
                assert(insertIndex<i);
                covers[insertIndex++]=TOldCover(covers[i].oldPos,covers[i].newPos,clipLen);
                covers[i].oldPos+=clipLen;
                covers[i].newPos+=clipLen;
                covers[i].length-=clipLen;
                assert(covers[i].length==clen);
            }
            covers[insertIndex++]=covers[i];
        }
        assert(isize==0);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %r15
movq %r15, %rsi
subq %rax, %rsi
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r12, %rsi
subq %rax, %r15
je 0x12003
cmpq $0x1, %rsi
movq %rsi, %rcx
adcq $0x0, %rcx
xorl %r13d, %r13d
xorl %edx, %edx
leaq (%rdx,%rdx,2), %rdi
movq 0x10(%rax,%rdi,8), %rdi
cmpq %rbx, %rdi
jbe 0x11ff9
movq %rdi, %r8
incq %r8
shrq %r8
cmpq %rbx, %r8
ja 0x11fe6
incq %r13
subq %r8, %rdi
jmp 0x11fde
incq %rdx
cmpq %rcx, %rdx
jne 0x11fd5
jmp 0x12006
xorl %r13d, %r13d
testq %r13, %r13
je 0x120e8
addq %r13, %rsi
movq %r14, %rdi
callq 0x12346
movq (%r14), %rsi
leaq (,%r13,2), %rax
addq %r13, %rax
leaq (%rsi,%rax,8), %rdi
movq %r15, %rdx
callq 0x4510
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %r12, %rcx
cmpq %rcx, %r13
jae 0x12130
xorl %ecx, %ecx
movq %r13, %rdx
leaq (%rdx,%rdx,2), %rsi
leaq (%rax,%rsi,8), %rsi
movq 0x10(%rsi), %rdi
cmpq %rbx, %rdi
jbe 0x120ae
movq %rdi, %r8
incq %r8
shrq %r8
cmpq %rbx, %r8
ja 0x12068
cmpq %rdx, %rcx
jae 0x120f2
movups (%rsi), %xmm0
leaq (%rcx,%rcx,2), %r9
movups %xmm0, (%rax,%r9,8)
movq %r8, 0x10(%rax,%r9,8)
addq %r8, (%rsi)
addq %r8, 0x8(%rsi)
movq 0x10(%rsi), %r9
movq %r9, %r10
subq %r8, %r10
movq %r10, 0x10(%rsi)
cmpq %rdi, %r9
jne 0x12111
decq %r13
subq %r8, %rdi
incq %rcx
jmp 0x12060
leaq (%rcx,%rcx,2), %rdi
incq %rcx
movq 0x10(%rsi), %r8
movq %r8, 0x10(%rax,%rdi,8)
movups (%rsi), %xmm0
movups %xmm0, (%rax,%rdi,8)
incq %rdx
movq (%r14), %rax
movq 0x8(%r14), %rsi
subq %rax, %rsi
sarq $0x3, %rsi
imulq %r12, %rsi
cmpq %rsi, %rdx
jb 0x12054
testq %r13, %r13
jne 0x12130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x49d75(%rip), %rdi     # 0x5be6e
leaq 0x49837(%rip), %rsi     # 0x5b937
leaq 0x49d75(%rip), %rcx     # 0x5be7c
movl $0x235, %edx            # imm = 0x235
callq 0x4200
leaq 0x49dbf(%rip), %rdi     # 0x5bed7
leaq 0x49818(%rip), %rsi     # 0x5b937
leaq 0x49d56(%rip), %rcx     # 0x5be7c
movl $0x23a, %edx            # imm = 0x23A
callq 0x4200
leaq 0x49db7(%rip), %rdi     # 0x5beee
leaq 0x497f9(%rip), %rsi     # 0x5b937
leaq 0x49d37(%rip), %rcx     # 0x5be7c
movl $0x23e, %edx            # imm = 0x23E
callq 0x4200