// File: 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
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0xad(%rbp)
jl 0x2b1db
movq -0xb8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0xc0(%rbp)
callq 0x25560
movq -0xc0(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0xad(%rbp)
jge 0x2b1db
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0xad(%rbp)
jl 0x2b1db
movq -0xb8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq %rax, -0xc8(%rbp)
callq 0x25580
movq %rax, %rcx
movq -0xc8(%rbp), %rax
cmpq %rcx, %rax
setl %al
movb %al, -0xad(%rbp)
movb -0xad(%rbp), %al
testb $0x1, %al
jne 0x2b1e7
jmp 0x2b1e9
jmp 0x2b208
leaq 0x644db(%rip), %rdi     # 0x8f6cb
leaq 0x62e7d(%rip), %rsi     # 0x8e074
movl $0x46b, %edx            # imm = 0x46B
leaq 0x645e5(%rip), %rcx     # 0x8f7e8
callq 0xa330
movq -0xb8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x2b960
testb $0x1, %al
jne 0x2b22d
jmp 0x2b399
movq -0xb8(%rbp), %rdi
callq 0x2b990
cmpq $0x0, %rax
jne 0x2b317
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
callq 0x2ba40
cmpq $0x0, %rax
jne 0x2b273
movq -0xb8(%rbp), %rax
movq %rax, %rdi
addq $0x28, %rdi
movq 0x10(%rax), %rsi
shlq %rsi
callq 0x27e40
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rdi
shlq $0x2, %rdi
callq 0xa6b0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpq $0x0, 0x20(%rax)
jne 0x2b2a1
callq 0x26450
movq -0xb8(%rbp), %rax
movq 0x20(%rax), %rdi
movq 0x8(%rax), %rdx
shlq $0x2, %rdx
xorl %esi, %esi
callq 0xa270
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
callq 0x2ba40
movq %rax, %rdi
callq 0x2ba60
movl %eax, -0x34(%rbp)
movq $0x1, -0x40(%rbp)
movq -0xb8(%rbp), %rcx
movq -0x40(%rbp), %rax
cmpq 0x8(%rcx), %rax
jg 0x2b312
movq -0xb8(%rbp), %rax
movl -0x34(%rbp), %edx
movq 0x18(%rax), %rax
movq -0x40(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x2b2de
jmp 0x2b397
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rdi
shlq $0x2, %rdi
callq 0xa6b0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpq $0x0, 0x20(%rax)
jne 0x2b345
callq 0x26450
movq $0x0, -0x48(%rbp)
movq -0xb8(%rbp), %rcx
movq -0x48(%rbp), %rax
cmpq 0x8(%rcx), %rax
jge 0x2b395
movq -0xb8(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x48(%rbp), %rdx
movl 0x4(%rcx,%rdx,4), %edx
movq 0x18(%rax), %rcx
movq -0x48(%rbp), %rsi
subl (%rcx,%rsi,4), %edx
movq 0x20(%rax), %rax
movq -0x48(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x2b34d
jmp 0x2b397
jmp 0x2b399
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
callq 0x2ba40
movq %rax, %rcx
movq -0xb8(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
cmpq -0x50(%rbp), %rax
jne 0x2b539
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
callq 0x2ba80
movq %rax, %rdi
callq 0x2ba60
movl %eax, -0x54(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x60(%rbp)
movb %al, -0xc9(%rbp)
jl 0x2b41b
movq -0xb8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x60(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
sete %al
movb %al, -0xc9(%rbp)
movb -0xc9(%rbp), %al
testb $0x1, %al
jne 0x2b427
jmp 0x2b449
movq -0xb8(%rbp), %rax
movl -0x54(%rbp), %edx
movq 0x18(%rax), %rax
movq -0x60(%rbp), %rcx
movq %rcx, %rsi
addq $-0x1, %rsi
movq %rsi, -0x60(%rbp)
movl %edx, (%rax,%rcx,4)
jmp 0x2b3f0
movq -0xb8(%rbp), %rdi
movq 0x20(%rdi), %rax
movq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
addq $0x28, %rdi
xorps %xmm0, %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x30(%rbp), %rdx
leaq -0x68(%rbp), %rsi
callq 0x2baa0
movq -0xb8(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0xd8(%rbp)
addq $0x28, %rdi
callq 0x2ba40
movq %rax, %rcx
movq -0xd8(%rbp), %rax
cmpq %rcx, %rax
je 0x2b51c
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
callq 0x2ba40
movq %rax, %rdi
callq 0x2ba60
movl %eax, -0x6c(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movq -0xb8(%rbp), %rcx
movq -0x78(%rbp), %rax
cmpq 0x8(%rcx), %rax
jg 0x2b51a
movq -0xb8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x78(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
cmpq -0x50(%rbp), %rax
jne 0x2b50a
movq -0xb8(%rbp), %rax
movl -0x6c(%rbp), %edx
movq 0x18(%rax), %rax
movq -0x78(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x2b50c
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x2b4cb
jmp 0x2b51c
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
movslq -0x54(%rbp), %rsi
callq 0x27ec0
movq %rax, -0x8(%rbp)
jmp 0x2b8d5
movq -0xb8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rcx
movslq 0x4(%rax,%rcx,4), %rax
cmpq -0x50(%rbp), %rax
jne 0x2b81c
movq -0xb8(%rbp), %rdi
movq 0x18(%rdi), %rax
movq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x20(%rdi), %rcx
movq -0x28(%rbp), %rdx
addl (%rcx,%rdx,4), %eax
cltq
movq %rax, -0xe0(%rbp)
addq $0x28, %rdi
callq 0x2ba80
movq %rax, %rcx
movq -0xe0(%rbp), %rax
cmpq %rcx, %rax
jne 0x2b81c
movq -0xb8(%rbp), %rdi
movq 0x20(%rdi), %rax
movq -0x28(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq %rdi, %rax
addq $0x28, %rax
movq %rax, -0xf0(%rbp)
addq $0x28, %rdi
callq 0x2ba80
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
addq $0x1, %rsi
xorps %xmm0, %xmm0
callq 0x27ee0
movq -0xb8(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0xe8(%rbp)
addq $0x28, %rdi
callq 0x2ba40
movq %rax, %rcx
movq -0xe8(%rbp), %rax
cmpq %rcx, %rax
je 0x2b696
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
callq 0x2ba40
movq %rax, %rdi
callq 0x2ba60
movl %eax, -0x7c(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
movq -0xb8(%rbp), %rcx
movq -0x88(%rbp), %rax
cmpq 0x8(%rcx), %rax
jg 0x2b694
movq -0xb8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x88(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
cmpq -0x50(%rbp), %rax
jne 0x2b67e
movq -0xb8(%rbp), %rax
movl -0x7c(%rbp), %edx
movq 0x18(%rax), %rax
movq -0x88(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x2b680
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x2b636
jmp 0x2b696
movq -0xb8(%rbp), %rcx
movq 0x18(%rcx), %rax
movq -0x28(%rbp), %rdx
movslq (%rax,%rdx,4), %rax
movq %rax, -0x90(%rbp)
movq 0x18(%rcx), %rax
movq -0x28(%rbp), %rdx
movl (%rax,%rdx,4), %eax
movq 0x20(%rcx), %rcx
movq -0x28(%rbp), %rdx
addl (%rcx,%rdx,4), %eax
subl $0x1, %eax
cltq
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rcx
xorl %eax, %eax
cmpq -0x90(%rbp), %rcx
movb %al, -0xf1(%rbp)
jle 0x2b715
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
movq -0x98(%rbp), %rsi
subq $0x1, %rsi
callq 0x27e90
movslq (%rax), %rax
cmpq -0x30(%rbp), %rax
setg %al
movb %al, -0xf1(%rbp)
movb -0xf1(%rbp), %al
testb $0x1, %al
jne 0x2b724
jmp 0x2b7c7
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
movq -0x98(%rbp), %rsi
subq $0x1, %rsi
callq 0x27e90
movq -0xb8(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x104(%rbp)
addq $0x28, %rdi
movq -0x98(%rbp), %rsi
callq 0x27e90
movl -0x104(%rbp), %ecx
movq -0xb8(%rbp), %rdi
movl %ecx, (%rax)
addq $0x28, %rdi
movq -0x98(%rbp), %rsi
subq $0x1, %rsi
callq 0x27ec0
movq -0xb8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x100(%rbp)
addq $0x28, %rdi
movq -0x98(%rbp), %rsi
callq 0x27ec0
movsd -0x100(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0x98(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x98(%rbp)
jmp 0x2b6d2
movq -0x30(%rbp), %rdi
callq 0x2ba60
movq -0xb8(%rbp), %rdi
movl %eax, -0x108(%rbp)
addq $0x28, %rdi
movq -0x98(%rbp), %rsi
callq 0x27e90
movl -0x108(%rbp), %ecx
movq -0xb8(%rbp), %rdi
movl %ecx, (%rax)
addq $0x28, %rdi
movq -0x98(%rbp), %rsi
callq 0x27ec0
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movq %rax, -0x8(%rbp)
jmp 0x2b8d5
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
callq 0x2ba80
movq -0xb8(%rbp), %rdi
movq %rax, -0x110(%rbp)
addq $0x28, %rdi
callq 0x2ba40
movq %rax, %rcx
movq -0x110(%rbp), %rax
cmpq %rcx, %rax
je 0x2b8bd
movq -0xb8(%rbp), %rdi
movq %rdi, %rax
addq $0x28, %rax
movq %rax, -0x118(%rbp)
addq $0x28, %rdi
callq 0x2ba40
movq -0x118(%rbp), %rdi
movq %rax, %rsi
xorps %xmm0, %xmm0
callq 0x27ee0
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rsi
movl $0x2, -0xac(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xac(%rbp), %rdx
callq 0x2c0a0
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x2bb20
movq -0xb8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2c0f0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)