// File: benjibc[P]json-universal-container/./boost_file/boost/container/vector.hpp
// Function: boost::container::vector<JSON, std::allocator<JSON>>::priv_range_insert_expand_forward(JSON*, unsigned long, boost::container::container_detail::advanced_insert_aux_int<JSON*>&)
void priv_range_insert_expand_forward(T* pos, size_type n, advanced_insert_aux_int_t &interf)
   {
      //n can't be 0, because there is nothing to do in that case
      if(!n) return;
      //There is enough memory
      T* old_finish = container_detail::to_raw_pointer(this->members_.m_start) + this->members_.m_size;
      const size_type elems_after = old_finish - pos;

      if (elems_after >= n){
         //New elements can be just copied.
         //Move to uninitialized memory last objects
         ::boost::container::uninitialized_move_alloc
            (this->alloc(), old_finish - n, old_finish, old_finish);
         this->members_.m_size += n;
         //Copy previous to last objects to the initialized end
         boost::move_backward(pos, old_finish - n, old_finish);
         //Insert new objects in the pos
         interf.copy_remaining_to(pos);
      }
      else {
         //The new elements don't fit in the [pos, end()) range. Copy
         //to the beginning of the unallocated zone the last new elements.
         interf.uninitialized_copy_some_and_update(old_finish, elems_after, false);
         this->members_.m_size += n - elems_after;
         //Copy old [pos, end()) elements to the uninitialized memory
         ::boost::container::uninitialized_move_alloc
            (this->alloc(), pos, old_finish, container_detail::to_raw_pointer(this->members_.m_start) + this->members_.m_size);
         this->members_.m_size += elems_after;
         //Copy first new elements in pos
         interf.copy_remaining_to(pos);
      }
   }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x9aaf
jmp 0x9c0e
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0x85b0
movq 0x20(%rsp), %rcx
imulq $0x30, 0x8(%rcx), %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq 0x48(%rsp), %rcx
subq %rcx, %rax
movl $0x30, %ecx
cqto
idivq %rcx
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x40(%rsp), %rax
jb 0x9b6d
movq 0x20(%rsp), %rdi
callq 0x85a0
movq %rax, %rdi
movq 0x30(%rsp), %rsi
xorl %eax, %eax
subq 0x40(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rsi
movq 0x30(%rsp), %rdx
movq 0x30(%rsp), %rcx
callq 0xab50
movq 0x20(%rsp), %rax
movq 0x40(%rsp), %rcx
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rsi
xorl %eax, %eax
subq 0x40(%rsp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rsi
movq 0x30(%rsp), %rdx
callq 0xabe0
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq (%rdi), %rax
callq *(%rax)
jmp 0x9c0e
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq (%rdi), %rax
xorl %ecx, %ecx
callq *0x10(%rax)
movq 0x20(%rsp), %rdi
movq 0x40(%rsp), %rax
subq 0x28(%rsp), %rax
addq 0x8(%rdi), %rax
movq %rax, 0x8(%rdi)
callq 0x85a0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rsp)
movq 0x48(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq (%rax), %rdi
callq 0x85b0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rax, %rcx
movq 0x20(%rsp), %rax
imulq $0x30, 0x8(%rax), %rax
addq %rax, %rcx
callq 0xab50
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq (%rdi), %rax
callq *(%rax)
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)