// File: /workspace/github_cpp_makefile_star2_O3/mshabbirhasan[P]ups-indel/include/seqan/sequence/string_base.h
// Function: seqan::Size<seqan::String<char, seqan::Alloc<void>>>::Type seqan::ClearSpaceExpandStringBase_<seqan::Tag<seqan::TagGenerous_>>::_clearSpace_<seqan::String<char, seqan::Alloc<void>>>(seqan::String<char, seqan::Alloc<void>>&, seqan::Size<seqan::String<char, seqan::Alloc<void>>>::Type, seqan::Size<seqan::String<char, seqan::Alloc<void>>>::Type, seqan::Size<seqan::String<char, seqan::Alloc<void>>>::Type)
static typename Size<T>::Type
    _clearSpace_(
        T & seq,
        typename Size<T>::Type size,
        typename Size<T>::Type start,
        typename Size<T>::Type end)
    {
        typename Size<T>::Type old_length = length(seq);
        typename Size<T>::Type removed_size = end - start;
        typename Size<T>::Type new_length = old_length - removed_size + size;

        typename Size<T>::Type old_capacity = capacity(seq);
        typename Value<T>::Type * old_array = _reallocateStorage(seq, new_length, TExpand());
        typename Value<T>::Type * seq_array = begin(seq);

        if (old_array)
        {
            SEQAN_CHECKPOINT;
            arrayConstructMove(old_array, old_array + start, seq_array);
            arrayConstructMove(old_array + end, old_array + old_length, seq_array + start + size);
            _deallocateStorage(seq, old_array, old_capacity);
        }
        else
        {
            SEQAN_CHECKPOINT;
            arrayClearSpace(seq_array + start, old_length - start, removed_size, size);
        }

        _setLength(seq, new_length);

        return size;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r8
movq (%rdi), %r12
movq 0x8(%rdi), %r14
movq %r14, %rcx
subq %r12, %rcx
movq %r15, %rbx
subq %rdx, %rbx
movq %rcx, %r9
subq %rbx, %r9
addq %rsi, %r9
movq %r12, %rax
cmpq %r9, 0x10(%rdi)
jae 0xb462
movq %rcx, -0x48(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, %rax
shrq %rax
addq %r9, %rax
movq %r9, -0x38(%rbp)
cmpq $0x20, %r9
movl $0x20, %ecx
cmovaeq %rax, %rcx
movq %rcx, -0x50(%rbp)
movq %rdi, -0x40(%rbp)
leaq 0x1(%rcx), %rdi
callq 0x3340
movq -0x40(%rbp), %rdi
movq %rax, (%rdi)
movq -0x50(%rbp), %rcx
movq %rcx, 0x10(%rdi)
testq %r12, %r12
je 0xb456
testq %r13, %r13
je 0xb41e
xorl %ecx, %ecx
movb (%r12,%rcx), %dl
movb %dl, (%rax,%rcx)
incq %rcx
cmpq %rcx, %r13
jne 0xb40f
addq %r12, %r15
cmpq %r14, %r15
movq -0x30(%rbp), %rcx
je 0xb440
addq %r13, %rax
addq %rcx, %rax
movb (%r15), %cl
movb %cl, (%rax)
incq %r15
incq %rax
cmpq %r14, %r15
jne 0xb430
movq %r12, %rdi
callq 0x32f0
movq -0x30(%rbp), %r8
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %r9
jmp 0xb467
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movq -0x48(%rbp), %rcx
cmpq %r8, %rbx
jne 0xb480
addq (%rdi), %r9
movq %r9, 0x8(%rdi)
movq %r8, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jge 0xb4bf
cmpq %r15, %rcx
je 0xb467
addq %r8, %r13
movq %r15, %rcx
notq %rcx
addq %r13, %rcx
addq %r14, %rcx
subq %r12, %rcx
addq %rax, %rcx
addq %r12, %r15
subq %r14, %r15
notq %r12
addq %r14, %rax
addq %r12, %rax
xorl %edx, %edx
movb (%rax,%rdx), %sil
movb %sil, (%rcx,%rdx)
decq %rdx
cmpq %rdx, %r15
jne 0xb4ad
jmp 0xb467
cmpq %r15, %rcx
je 0xb467
addq %rax, %r13
addq %r15, %rax
addq %r8, %r13
subq %r15, %r14
subq %r12, %r14
xorl %ecx, %ecx
movb (%rax,%rcx), %dl
movb %dl, (%r13,%rcx)
incq %rcx
cmpq %rcx, %r14
jne 0xb4d5
jmp 0xb467
nop