// File: /workspace/github_cpp_makefile_star2_O3/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 0x159db
movq %rdx, %r14
testq %rdx, %rdx
js 0x159db
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rdi), %rsi
cmpq %rbx, %rsi
jle 0x159db
movq 0x8(%r15), %r12
cmpq %r14, %r12
jle 0x159db
movq 0x20(%r15), %rax
testq %rax, %rax
jne 0x15827
movq 0x18(%r15), %r13
movl (%r13,%r12,4), %eax
cmpl (%r13), %eax
jne 0x157f2
cmpq $0x0, 0x40(%r15)
jne 0x156d4
leaq 0x28(%r15), %rdi
addq %rsi, %rsi
callq 0x15222
movq 0x8(%r15), %r12
leaq (,%r12,4), %rsi
movl $0x1, %edi
callq 0x7260
movq %rax, 0x20(%r15)
testq %rax, %rax
je 0x159fa
testq %r12, %r12
jle 0x15827
movl 0x40(%r15), %ecx
movq 0x18(%r15), %rdx
leaq 0x3(%r12), %rsi
andq $-0x4, %rsi
decq %r12
movq %r12, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
xorl %edi, %edi
movdqa 0x3549c(%rip), %xmm1    # 0x4abc0
movdqa 0x35454(%rip), %xmm2    # 0x4ab80
movdqa 0x3545c(%rip), %xmm3    # 0x4ab90
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rdi, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %r8d
notl %r8d
testb $0x1, %r8b
je 0x15785
movl %ecx, 0x4(%rdx,%rdi,4)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %r8d
testb $0x1, %r8b
je 0x15799
movl %ecx, 0x8(%rdx,%rdi,4)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %r8d
testb $0x1, %r8b
je 0x157d3
movl %ecx, 0xc(%rdx,%rdi,4)
pextrw $0x4, %xmm5, %r8d
testb $0x1, %r8b
je 0x157e3
movl %ecx, 0x10(%rdx,%rdi,4)
addq $0x4, %rdi
cmpq %rdi, %rsi
jne 0x1573c
jmp 0x15827
leaq (,%r12,4), %rdi
callq 0x74c0
movq %rax, 0x20(%r15)
testq %rax, %rax
je 0x159fa
xorl %ecx, %ecx
movl 0x4(%r13,%rcx,4), %edx
subl (%r13,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
leaq 0x1(%rcx), %rdx
movq %rdx, %rcx
cmpq %rdx, %r12
jne 0x1580e
leaq 0x28(%r15), %r12
movq 0x18(%r15), %rcx
movq 0x40(%r15), %r13
movslq (%rcx,%r14,4), %rsi
cmpq %rsi, %r13
jne 0x158bb
movq 0x38(%r15), %rbp
leaq 0x1(%r14), %rdx
cmpl $0x0, -0x4(%rax,%rdx,4)
jne 0x15857
movl %ebp, -0x4(%rcx,%rdx,4)
decq %rdx
testq %rdx, %rdx
jg 0x15844
incl (%rax,%r14,4)
leaq 0x1(%rbp), %rsi
movq 0x35301(%rip), %xmm0    # 0x4ab68
movq %r12, %rdi
callq 0x15338
movq 0x28(%r15), %rax
movq $0x0, (%rax,%rbp,8)
movq 0x30(%r15), %rcx
movl %ebx, (%rcx,%rbp,4)
movq 0x40(%r15), %rcx
cmpq %rcx, %r13
je 0x158af
movq 0x8(%r15), %rdx
cmpq %r14, %rdx
jle 0x158af
movq 0x18(%r15), %rsi
movslq 0x4(%rsi,%r14,4), %rdi
cmpq %rdi, %r13
jne 0x158a7
movl %ecx, 0x4(%rsi,%r14,4)
incq %r14
cmpq %r14, %rdx
jne 0x15898
movslq %ebp, %rcx
leaq (%rax,%rcx,8), %rax
jmp 0x159cc
movslq 0x4(%rcx,%r14,4), %rcx
cmpq %rcx, %r13
jne 0x158f9
movslq (%rax,%r14,4), %rcx
addq %rcx, %rsi
movq 0x38(%r15), %rdx
cmpq %rsi, %rdx
jne 0x158fd
incl %ecx
movl %ecx, (%rax,%r14,4)
incq %rsi
pxor %xmm0, %xmm0
movq %r12, %rdi
callq 0x15338
movq 0x40(%r15), %rcx
cmpq %rcx, %r13
jne 0x1594b
movq 0x18(%r15), %rax
jmp 0x15971
movq 0x38(%r15), %rdx
cmpq %r13, %rdx
je 0x15938
pxor %xmm0, %xmm0
movq %r12, %rdi
movq %r13, %rsi
callq 0x15338
movq 0x8(%r15), %rax
movq %rax, 0x8(%rsp)
movl $0x2, 0x14(%rsp)
testq %rax, %rax
js 0x15a28
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x15a48
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x15d88
jmp 0x159cc
movq 0x8(%r15), %rdx
movq 0x18(%r15), %rax
cmpq %r14, %rdx
jle 0x15971
movq %r14, %rsi
movslq 0x4(%rax,%rsi,4), %rdi
cmpq %rdi, %r13
jne 0x15969
movl %ecx, 0x4(%rax,%rsi,4)
incq %rsi
cmpq %rsi, %rdx
jne 0x1595b
movslq (%rax,%r14,4), %rcx
movq 0x20(%r15), %rdx
movq 0x30(%r15), %rax
movl (%rdx,%r14,4), %edx
addl %ecx, %edx
decl %edx
movslq %edx, %rdx
cmpl %ecx, %edx
jle 0x159b7
movq (%r12), %rdi
movslq -0x4(%rax,%rdx,4), %r8
cmpq %rbx, %r8
jle 0x159b7
leaq -0x1(%rdx), %rsi
movl %r8d, (%rax,%rdx,4)
movq -0x8(%rdi,%rdx,8), %xmm0
movq %xmm0, (%rdi,%rdx,8)
movq %rsi, %rdx
cmpq %rcx, %rsi
jg 0x15990
jmp 0x159ba
movq %rdx, %rsi
movl %ebx, (%rax,%rsi,4)
movq (%r12), %rax
leaq (%rax,%rsi,8), %rax
movq $0x0, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x36372(%rip), %rdi     # 0x4bd54
leaq 0x3548b(%rip), %rsi     # 0x4ae74
leaq 0x3644a(%rip), %rcx     # 0x4be3a
movl $0x46b, %edx            # imm = 0x46B
callq 0x7240
movl $0x8, %edi
callq 0x71b0
movq 0x4b575(%rip), %rcx     # 0x60f80
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x4b587(%rip), %rsi     # 0x60fa0
movq 0x4b538(%rip), %rdx     # 0x60f58
movq %rax, %rdi
callq 0x7690
leaq 0x357fd(%rip), %rdi     # 0x4b22c
leaq 0x3588b(%rip), %rsi     # 0x4b2c1
leaq 0x365b2(%rip), %rcx     # 0x4bfef
movl $0x4a, %edx
callq 0x7240
nop