// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/vot/../../include/Eigen/src/SparseCore/SparseMatrix.h
// Function: void Eigen::SparseMatrix<double, 0, int>::reserveInnerVectors<Eigen::SparseMatrix<double, 0, int>::SingletonVector>(Eigen::SparseMatrix<double, 0, int>::SingletonVector const&)
inline void reserveInnerVectors(const SizesType& reserveSizes)
    {
      if(isCompressed())
      {
        Index totalReserveSize = 0;
        // turn the matrix into non-compressed mode
        m_innerNonZeros = static_cast<StorageIndex*>(std::malloc(m_outerSize * sizeof(StorageIndex)));
        if (!m_innerNonZeros) internal::throw_std_bad_alloc();
        
        // temporarily use m_innerSizes to hold the new starting points.
        StorageIndex* newOuterIndex = m_innerNonZeros;
        
        StorageIndex count = 0;
        for(Index j=0; j<m_outerSize; ++j)
        {
          newOuterIndex[j] = count;
          count += reserveSizes[j] + (m_outerIndex[j+1]-m_outerIndex[j]);
          totalReserveSize += reserveSizes[j];
        }
        m_data.reserve(totalReserveSize);
        StorageIndex previousOuterIndex = m_outerIndex[m_outerSize];
        for(Index j=m_outerSize-1; j>=0; --j)
        {
          StorageIndex innerNNZ = previousOuterIndex - m_outerIndex[j];
          for(Index i=innerNNZ-1; i>=0; --i)
          {
            m_data.index(newOuterIndex[j]+i) = m_data.index(m_outerIndex[j]+i);
            m_data.value(newOuterIndex[j]+i) = m_data.value(m_outerIndex[j]+i);
          }
          previousOuterIndex = m_outerIndex[j];
          m_outerIndex[j] = newOuterIndex[j];
          m_innerNonZeros[j] = innerNNZ;
        }
        m_outerIndex[m_outerSize] = m_outerIndex[m_outerSize-1] + m_innerNonZeros[m_outerSize-1] + reserveSizes[m_outerSize-1];
        
        m_data.resize(m_outerIndex[m_outerSize]);
      }
      else
      {
        StorageIndex* newOuterIndex = static_cast<StorageIndex*>(std::malloc((m_outerSize+1)*sizeof(StorageIndex)));
        if (!newOuterIndex) internal::throw_std_bad_alloc();
        
        StorageIndex count = 0;
        for(Index j=0; j<m_outerSize; ++j)
        {
          newOuterIndex[j] = count;
          StorageIndex alreadyReserved = (m_outerIndex[j+1]-m_outerIndex[j]) - m_innerNonZeros[j];
          StorageIndex toReserve = std::max<StorageIndex>(reserveSizes[j], alreadyReserved);
          count += toReserve + m_innerNonZeros[j];
        }
        newOuterIndex[m_outerSize] = count;
        
        m_data.resize(count);
        for(Index j=m_outerSize-1; j>=0; --j)
        {
          Index offset = newOuterIndex[j] - m_outerIndex[j];
          if(offset>0)
          {
            StorageIndex innerNNZ = m_innerNonZeros[j];
            for(Index i=innerNNZ-1; i>=0; --i)
            {
              m_data.index(newOuterIndex[j]+i) = m_data.index(m_outerIndex[j]+i);
              m_data.value(newOuterIndex[j]+i) = m_data.value(m_outerIndex[j]+i);
            }
          }
        }
        
        std::swap(m_outerIndex, newOuterIndex);
        std::free(newOuterIndex);
      }
      
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %r12
movq 0x20(%rdi), %r13
leaq (,%r12,4), %rdi
testq %r13, %r13
je 0x11cb9
addq $0x4, %rdi
callq 0x74b0
movq %rax, %r15
testq %rax, %rax
jne 0x11bce
callq 0x1062c
movq 0x8(%rbx), %r12
movq 0x20(%rbx), %r13
movq 0x18(%rbx), %rax
movslq (%r14), %rcx
movl 0x4(%r14), %edx
xorl %esi, %esi
testq %r12, %r12
movl $0x0, %edi
cmovgq %r12, %rdi
xorl %r8d, %r8d
cmpq %r8, %rdi
je 0x11c29
movl %esi, (%r15,%r8,4)
movl 0x4(%rax,%r8,4), %r9d
movl (%r13,%r8,4), %r10d
movl (%rax,%r8,4), %r11d
addl %r10d, %r11d
subl %r11d, %r9d
cmpq %r8, %rcx
movl $0x0, %r11d
cmovel %edx, %r11d
incq %r8
cmpl %r9d, %r11d
cmovlel %r9d, %r11d
addl %esi, %r10d
addl %r11d, %r10d
movl %r10d, %esi
jmp 0x11bea
movl %esi, (%r15,%r12,4)
leaq 0x28(%rbx), %rdi
movslq %esi, %rsi
xorps %xmm0, %xmm0
callq 0x10c46
movq 0x8(%rbx), %rcx
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rax
testq %rcx, %rcx
jle 0x11ca7
movq %rcx, %rdx
decq %rcx
movslq -0x4(%r15,%rdx,4), %r14
movl -0x4(%rdi,%rdx,4), %esi
cmpl %esi, %r14d
jle 0x11c48
movslq -0x4(%rax,%rdx,4), %r8
decq %r8
movq 0x28(%rbx), %r9
movq 0x30(%rbx), %r10
leaq (%r9,%r14,8), %r11
leaq (%r10,%r14,4), %r14
testq %r8, %r8
js 0x11c48
movslq %esi, %rsi
leaq (%r10,%rsi,4), %rsi
movl (%rsi,%r8,4), %esi
movl %esi, (%r14,%r8,4)
movslq -0x4(%rdi,%rdx,4), %rsi
leaq (%r9,%rsi,8), %r12
movsd (%r12,%r8,8), %xmm0
movsd %xmm0, (%r11,%r8,8)
decq %r8
jmp 0x11c79
movq %r15, 0x18(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x7410
callq 0x74b0
movq %rax, %r15
movq %rax, 0x20(%rbx)
testq %rax, %rax
jne 0x11cd7
callq 0x1062c
movq 0x8(%rbx), %r12
movq 0x20(%rbx), %r15
movq 0x18(%rbx), %rax
xorl %ecx, %ecx
testq %r12, %r12
cmovleq %rcx, %r12
xorl %edx, %edx
xorl %esi, %esi
cmpq %rcx, %r12
je 0x11d13
movl %edx, (%r15,%rcx,4)
movslq (%r14), %r8
xorl %edi, %edi
cmpq %r8, %rcx
jne 0x11cff
movl 0x4(%r14), %edi
addl 0x4(%rax,%rcx,4), %edx
addl %edi, %edx
subl (%rax,%rcx,4), %edx
incq %rcx
movslq %edi, %rdi
addq %rdi, %rsi
jmp 0x11ce8
leaq 0x28(%rbx), %r12
movq %r12, %rdi
callq 0x10c36
movq 0x8(%rbx), %rax
movq 0x18(%rbx), %rcx
movl (%rcx,%rax,4), %edi
movq 0x20(%rbx), %rdx
movq %rax, %rsi
testq %rsi, %rsi
jle 0x11da4
decq %rsi
movl (%rcx,%rsi,4), %r8d
subl %r8d, %edi
leal -0x1(%rdi), %r9d
movslq %r9d, %r9
leaq (,%r9,8), %r10
addq 0x28(%rbx), %r10
leaq (,%r9,4), %r11
addq 0x30(%rbx), %r11
testq %r9, %r9
js 0x11d94
movslq %r8d, %r8
movl (%r11,%r8,4), %r8d
movslq (%r15,%rsi,4), %r13
movl %r8d, (%r11,%r13,4)
movslq (%rcx,%rsi,4), %r8
movsd (%r10,%r8,8), %xmm0
movslq (%r15,%rsi,4), %r13
movsd %xmm0, (%r10,%r13,8)
decq %r9
addq $-0x8, %r10
addq $-0x4, %r11
jmp 0x11d5f
movl (%r15,%rsi,4), %r9d
movl %r9d, (%rcx,%rsi,4)
movl %edi, (%rdx,%rsi,4)
movl %r8d, %edi
jmp 0x11d31
movl -0x4(%rdx,%rax,4), %edx
addl -0x4(%rcx,%rax,4), %edx
leaq -0x1(%rax), %rdi
movslq (%r14), %r8
xorl %esi, %esi
cmpq %r8, %rdi
jne 0x11dbe
movl 0x4(%r14), %esi
addl %esi, %edx
movl %edx, (%rcx,%rax,4)
movslq %edx, %rsi
xorps %xmm0, %xmm0
movq %r12, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x10c46