// File: 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 %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1a300
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x1e3c4
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1fb50
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
jbe 0x1e3b4
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x24eb0
jmp 0x1e38f
jmp 0x1e3b6
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x1e370
cmpq $0x0, -0x20(%rbp)
jne 0x1e3d0
jmp 0x1e646
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq -0x20(%rbp), %rsi
callq 0x1e9f0
movq -0x8(%rbp), %rdi
callq 0x1a2e0
imulq $0x18, -0x20(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1a2e0
movq -0x70(%rbp), %rdi
movq %rax, %rsi
imulq $0x18, -0x18(%rbp), %rdx
callq 0x45c0
movq $0x0, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1a300
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
jae 0x1e61e
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x1fb50
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x10(%rbp), %rax
jbe 0x1e5c4
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x24eb0
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x1e48d
jmp 0x1e4ac
leaq 0x90e25(%rip), %rdi     # 0xaf2b9
leaq 0x908e7(%rip), %rsi     # 0xaed82
movl $0x235, %edx            # imm = 0x235
leaq 0x90e20(%rip), %rcx     # 0xaf2c7
callq 0x4270
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x1fb50
movq (%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x1fb50
movq -0x98(%rbp), %rsi
movq 0x8(%rax), %rdx
movq -0x50(%rbp), %rcx
leaq -0x68(%rbp), %rdi
callq 0x1cc20
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
callq 0x1fb50
movq -0x68(%rbp), %rcx
movq %rcx, (%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x50(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x1fb50
movq -0x90(%rbp), %rcx
addq (%rax), %rcx
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x1fb50
movq -0x88(%rbp), %rcx
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x1fb50
movq -0x80(%rbp), %rdx
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x1fb50
movq 0x10(%rax), %rax
cmpq -0x48(%rbp), %rax
jne 0x1e5a0
jmp 0x1e5bf
leaq 0x90d7b(%rip), %rdi     # 0xaf322
leaq 0x907d4(%rip), %rsi     # 0xaed82
movl $0x23a, %edx            # imm = 0x23A
leaq 0x90d0d(%rip), %rcx     # 0xaf2c7
callq 0x4270
jmp 0x1e456
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x1fb50
movq %rax, -0xa0(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
callq 0x1fb50
movq -0xa0(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x1e420
cmpq $0x0, -0x20(%rbp)
jne 0x1e627
jmp 0x1e646
leaq 0x90d0b(%rip), %rdi     # 0xaf339
leaq 0x9074d(%rip), %rsi     # 0xaed82
movl $0x23e, %edx            # imm = 0x23E
leaq 0x90c86(%rip), %rcx     # 0xaf2c7
callq 0x4270
addq $0xa0, %rsp
popq %rbp
retq
nop