// File: /workspace/github_cpp_makefile_star2_O3/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), %rax
movq 0x8(%rdi), %r15
movq %r15, %rsi
subq %rax, %rsi
subq %rax, %r15
je 0x11e40
movq %rdi, %r14
sarq $0x3, %rsi
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r12, %rsi
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 0x11d44
movq %rdi, %r8
incq %r8
shrq %r8
cmpq %rbx, %r8
ja 0x11d31
incq %r13
subq %r8, %rdi
jmp 0x11d29
incq %rdx
cmpq %rcx, %rdx
jne 0x11d20
testq %r13, %r13
je 0x11e40
addq %r13, %rsi
movq %r14, %rdi
callq 0x12098
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 0x11e88
xorl %ecx, %ecx
movq %r13, %rdx
leaq (%rdx,%rdx,2), %rsi
leaq (%rax,%rsi,8), %rsi
movq 0x10(%rsi), %rdi
cmpq %rbx, %rdi
jbe 0x11e06
movq %rdi, %r8
incq %r8
shrq %r8
cmpq %rbx, %r8
ja 0x11dae
cmpq %rdx, %rcx
jae 0x11e4a
movq (%rsi), %r9
movq 0x8(%rsi), %r10
leaq (%rcx,%rcx,2), %r11
movq %r9, (%rax,%r11,8)
movq %r10, 0x8(%rax,%r11,8)
movq %r8, 0x10(%rax,%r11,8)
addq %r8, %r9
movq %r9, (%rsi)
addq %r8, %r10
movq %r10, 0x8(%rsi)
movq 0x10(%rsi), %r9
movq %r9, %r10
subq %r8, %r10
movq %r10, 0x10(%rsi)
cmpq %rdi, %r9
jne 0x11e69
decq %r13
subq %r8, %rdi
incq %rcx
jmp 0x11da6
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 0x11d9a
testq %r13, %r13
jne 0x11e88
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x4a01d(%rip), %rdi     # 0x5be6e
leaq 0x49adf(%rip), %rsi     # 0x5b937
leaq 0x4a01d(%rip), %rcx     # 0x5be7c
movl $0x235, %edx            # imm = 0x235
callq 0x4200
leaq 0x4a067(%rip), %rdi     # 0x5bed7
leaq 0x49ac0(%rip), %rsi     # 0x5b937
leaq 0x49ffe(%rip), %rcx     # 0x5be7c
movl $0x23a, %edx            # imm = 0x23A
callq 0x4200
leaq 0x4a05f(%rip), %rdi     # 0x5beee
leaq 0x49aa1(%rip), %rsi     # 0x5b937
leaq 0x49fdf(%rip), %rcx     # 0x5be7c
movl $0x23e, %edx            # imm = 0x23E
callq 0x4200