// File: /workspace/github_cpp_makefile_star2_O2/icemiliang[P]vot/src/vot/../../include/Eigen/src/SparseCore/SparseMatrix.h
// Function: Eigen::SparseMatrix<double, 0, int>::insert(long, long)
typename SparseMatrix<_Scalar,_Options,_StorageIndex>::Scalar& SparseMatrix<_Scalar,_Options,_StorageIndex>::insert(Index row, Index col)
{
  eigen_assert(row>=0 && row<rows() && col>=0 && col<cols());
  
  const Index outer = IsRowMajor ? row : col;
  const Index inner = IsRowMajor ? col : row;
  
  if(isCompressed())
  {
    if(nonZeros()==0)
    {
      // reserve space if not already done
      if(m_data.allocatedSize()==0)
        m_data.reserve(2*m_innerSize);
      
      // 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();
      
      memset(m_innerNonZeros, 0, (m_outerSize)*sizeof(StorageIndex));
      
      // pack all inner-vectors to the end of the pre-allocated space
      // and allocate the entire free-space to the first inner-vector
      StorageIndex end = convert_index(m_data.allocatedSize());
      for(Index j=1; j<=m_outerSize; ++j)
        m_outerIndex[j] = end;
    }
    else
    {
      // 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();
      for(Index j=0; j<m_outerSize; ++j)
        m_innerNonZeros[j] = m_outerIndex[j+1]-m_outerIndex[j];
    }
  }
  
  // check whether we can do a fast "push back" insertion
  Index data_end = m_data.allocatedSize();
  
  // First case: we are filling a new inner vector which is packed at the end.
  // We assume that all remaining inner-vectors are also empty and packed to the end.
  if(m_outerIndex[outer]==data_end)
  {
    eigen_internal_assert(m_innerNonZeros[outer]==0);
    
    // pack previous empty inner-vectors to end of the used-space
    // and allocate the entire free-space to the current inner-vector.
    StorageIndex p = convert_index(m_data.size());
    Index j = outer;
    while(j>=0 && m_innerNonZeros[j]==0)
      m_outerIndex[j--] = p;
    
    // push back the new element
    ++m_innerNonZeros[outer];
    m_data.append(Scalar(0), inner);
    
    // check for reallocation
    if(data_end != m_data.allocatedSize())
    {
      // m_data has been reallocated
      //  -> move remaining inner-vectors back to the end of the free-space
      //     so that the entire free-space is allocated to the current inner-vector.
      eigen_internal_assert(data_end < m_data.allocatedSize());
      StorageIndex new_end = convert_index(m_data.allocatedSize());
      for(Index k=outer+1; k<=m_outerSize; ++k)
        if(m_outerIndex[k]==data_end)
          m_outerIndex[k] = new_end;
    }
    return m_data.value(p);
  }
  
  // Second case: the next inner-vector is packed to the end
  // and the current inner-vector end match the used-space.
  if(m_outerIndex[outer+1]==data_end && m_outerIndex[outer]+m_innerNonZeros[outer]==m_data.size())
  {
    eigen_internal_assert(outer+1==m_outerSize || m_innerNonZeros[outer+1]==0);
    
    // add space for the new element
    ++m_innerNonZeros[outer];
    m_data.resize(m_data.size()+1);
    
    // check for reallocation
    if(data_end != m_data.allocatedSize())
    {
      // m_data has been reallocated
      //  -> move remaining inner-vectors back to the end of the free-space
      //     so that the entire free-space is allocated to the current inner-vector.
      eigen_internal_assert(data_end < m_data.allocatedSize());
      StorageIndex new_end = convert_index(m_data.allocatedSize());
      for(Index k=outer+1; k<=m_outerSize; ++k)
        if(m_outerIndex[k]==data_end)
          m_outerIndex[k] = new_end;
    }
    
    // and insert it at the right position (sorted insertion)
    Index startId = m_outerIndex[outer];
    Index p = m_outerIndex[outer]+m_innerNonZeros[outer]-1;
    while ( (p > startId) && (m_data.index(p-1) > inner) )
    {
      m_data.index(p) = m_data.index(p-1);
      m_data.value(p) = m_data.value(p-1);
      --p;
    }
    
    m_data.index(p) = convert_index(inner);
    return (m_data.value(p) = 0);
  }
  
  if(m_data.size() != m_data.allocatedSize())
  {
    // make sure the matrix is compatible to random un-compressed insertion:
    m_data.resize(m_data.allocatedSize());
    this->reserveInnerVectors(Array<StorageIndex,Dynamic,1>::Constant(m_outerSize, 2));
  }
  
  return insertUncompressed(row,col);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rsi, %rsi
js 0x11659
movq %rdx, %r14
testq %rdx, %rdx
js 0x11659
movq %rsi, %rbx
movq %rdi, %r15
cmpq %rsi, 0x10(%rdi)
jle 0x11659
cmpq %r14, 0x8(%r15)
jle 0x11659
cmpq $0x0, 0x20(%r15)
je 0x11499
movq 0x18(%r15), %rcx
leaq 0x28(%r15), %r12
movq 0x40(%r15), %r13
movslq (%rcx,%r14,4), %rsi
cmpq %rsi, %r13
jne 0x113f3
movq 0x20(%r15), %rax
movq 0x38(%r15), %rbp
movq %r14, %rdx
testq %rdx, %rdx
js 0x11460
cmpl $0x0, (%rax,%rdx,4)
jne 0x11460
movl %ebp, (%rcx,%rdx,4)
decq %rdx
jmp 0x113e0
movslq 0x4(%rcx,%r14,4), %rax
cmpq %rax, %r13
jne 0x114f6
movq 0x20(%r15), %rax
movq 0x38(%r15), %rcx
movslq (%rax,%r14,4), %rdx
addq %rdx, %rsi
cmpq %rsi, %rcx
jne 0x114fa
incl %edx
movl %edx, (%rax,%r14,4)
incq %rsi
xorps %xmm0, %xmm0
movq %r12, %rdi
callq 0x10c46
movq 0x18(%r15), %rax
movq 0x40(%r15), %rcx
cmpq %rcx, %r13
je 0x115e7
leaq 0x1(%r14), %rdx
movq 0x8(%r15), %rsi
cmpq %rsi, %rdx
jg 0x115e3
movslq (%rax,%rdx,4), %rdi
cmpq %rdi, %r13
jne 0x1145b
movl %ecx, (%rax,%rdx,4)
incq %rdx
jmp 0x11446
movq 0x20(%r15), %rax
incl (%rax,%r14,4)
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
movq %r12, %rdi
movq %rbx, %rdx
callq 0x116ec
movq 0x40(%r15), %rax
cmpq %rax, %r13
jne 0x11547
movslq %ebp, %rax
shlq $0x3, %rax
addq (%r12), %rax
jmp 0x1164a
movq %r15, %rdi
callq 0x116a2
testq %rax, %rax
je 0x1156c
movq 0x8(%r15), %r12
leaq (,%r12,4), %rdi
callq 0x74b0
movq %rax, 0x20(%r15)
testq %rax, %rax
jne 0x114d1
callq 0x1062c
movq 0x8(%r15), %r12
movq 0x20(%r15), %rax
movq 0x18(%r15), %rcx
xorl %edx, %edx
testq %r12, %r12
cmovleq %rdx, %r12
cmpq %rdx, %r12
je 0x113c4
movl 0x4(%rcx,%rdx,4), %esi
subl (%rcx,%rdx,4), %esi
movl %esi, (%rax,%rdx,4)
incq %rdx
jmp 0x114de
movq 0x38(%r15), %rcx
cmpq %r13, %rcx
je 0x11534
xorps %xmm0, %xmm0
movq %r12, %rdi
movq %r13, %rsi
callq 0x10c46
movq 0x8(%r15), %rsi
leaq 0x4(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x119ac
movq %r15, %rdi
movq %r12, %rsi
callq 0x11736
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x119cc
jmp 0x1164a
movq 0x8(%r15), %rcx
movq 0x18(%r15), %rdx
cmpq %rcx, %r14
jge 0x11489
movslq 0x4(%rdx,%r14,4), %rsi
cmpq %rsi, %r13
jne 0x11567
movl %eax, 0x4(%rdx,%r14,4)
incq %r14
jmp 0x1154f
cmpq $0x0, 0x40(%r15)
jne 0x11583
leaq 0x28(%r15), %rdi
movq 0x10(%r15), %rsi
addq %rsi, %rsi
callq 0x10c36
movq 0x8(%r15), %r12
shlq $0x2, %r12
movq %r12, %rdi
callq 0x74b0
movq %rax, 0x20(%r15)
testq %rax, %rax
jne 0x115ad
callq 0x1062c
movq 0x8(%r15), %r12
movq 0x20(%r15), %rax
shlq $0x2, %r12
xorl %r13d, %r13d
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x7200
movl 0x40(%r15), %eax
movq 0x8(%r15), %rdx
movq 0x18(%r15), %rcx
testq %rdx, %rdx
cmovleq %r13, %rdx
cmpq %r13, %rdx
je 0x113c4
movl %eax, 0x4(%rcx,%r13,4)
incq %r13
jmp 0x115d0
movq 0x18(%r15), %rax
movslq (%rax,%r14,4), %rax
movq 0x20(%r15), %rdx
movq 0x28(%r15), %rcx
movl (%rdx,%r14,4), %edx
addl %eax, %edx
decl %edx
movslq %edx, %rdi
leaq (,%rdi,8), %rdx
leaq (,%rdi,4), %rsi
addq 0x30(%r15), %rsi
cmpq %rax, %rdi
jle 0x1163b
movslq -0x4(%rsi), %r8
cmpq %rbx, %r8
jle 0x1163b
movl %r8d, (%rsi)
movsd -0x8(%rcx,%rdx), %xmm0
movsd %xmm0, (%rcx,%rdx)
addq $-0x8, %rdx
addq $-0x4, %rsi
decq %rdi
jmp 0x11612
movl %ebx, (%rsi)
movq (%r12), %rcx
leaq (%rcx,%rdx), %rax
andq $0x0, (%rcx,%rdx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2ec97(%rip), %rdi     # 0x402f7
leaq 0x2d7bd(%rip), %rsi     # 0x3ee24
leaq 0x2ed6f(%rip), %rcx     # 0x403dd
movl $0x46b, %edx            # imm = 0x46B
callq 0x7270