// File: benjibc[P]json-universal-container/./boost_file/boost/container/vector.hpp
// Function: boost::container::vector<JSON, std::allocator<JSON>>::priv_range_insert(JSON*, unsigned long, boost::container::container_detail::advanced_insert_aux_int<JSON*>&)
void priv_range_insert(pointer pos, const size_type n, advanced_insert_aux_int_t &interf)
   {
      //Check if we have enough memory or try to expand current memory
      size_type remaining = this->members_.m_capacity - this->members_.m_size;
      bool same_buffer_start;
      std::pair<pointer, bool> ret;
      size_type real_cap = this->members_.m_capacity;

      //Check if we already have room
      if (n <= remaining){
         same_buffer_start = true;
      }
      else{
         //There is not enough memory, allocate a new
         //buffer or expand the old one.
         size_type new_cap = this->next_capacity(n);
         ret = this->allocation_command
               (allocate_new | expand_fwd | expand_bwd,
                  this->members_.m_size + n, new_cap, real_cap, this->members_.m_start);

         //Check for forward expansion
         same_buffer_start = ret.second && this->members_.m_start == ret.first;
         if(same_buffer_start){
            this->members_.m_capacity  = real_cap;
         }
      }
     
      //If we had room or we have expanded forward
      if (same_buffer_start){
         #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
         ++this->num_expand_fwd;
         #endif
         this->priv_range_insert_expand_forward
            (container_detail::to_raw_pointer(pos), n, interf);
      }
      //Backwards (and possibly forward) expansion
      else if(ret.second){
         #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
         ++this->num_expand_bwd;
         #endif
         this->priv_range_insert_expand_backwards
            ( container_detail::to_raw_pointer(ret.first)
            , real_cap
            , container_detail::to_raw_pointer(pos)
            , n
            , interf);
      }
      //New buffer
      else{
         #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
         ++this->num_alloc;
         #endif
         this->priv_range_insert_new_allocation
            ( container_detail::to_raw_pointer(ret.first)
            , real_cap
            , container_detail::to_raw_pointer(pos)
            , n
            , interf);
      }
   }

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq %rcx, 0x88(%rsp)
movq 0xa0(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq 0x10(%rcx), %rax
subq 0x8(%rcx), %rax
movq %rax, 0x80(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x9980
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x90(%rsp), %rax
cmpq 0x80(%rsp), %rax
ja 0x8d08
movb $0x1, 0x7f(%rsp)
jmp 0x8db6
movq 0x30(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x99a0
movq 0x30(%rsp), %r9
movq %rax, 0x58(%rsp)
movq 0x8(%r9), %rdx
movq 0x90(%rsp), %rax
addq %rax, %rdx
movq 0x58(%rsp), %rcx
movl $0x7, %esi
leaq 0x60(%rsp), %r8
movq %r9, %rdi
callq 0x99e0
movb %dl, 0x40(%rsp)
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x48(%rsp)
movb 0x40(%rsp), %al
movb %al, 0x50(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x9a50
xorl %eax, %eax
testb $0x1, 0x70(%rsp)
movb %al, 0x2f(%rsp)
je 0x8d95
movq 0x30(%rsp), %rax
movq (%rax), %rax
cmpq 0x68(%rsp), %rax
sete %al
movb %al, 0x2f(%rsp)
movb 0x2f(%rsp), %al
andb $0x1, %al
movb %al, 0x7f(%rsp)
testb $0x1, 0x7f(%rsp)
je 0x8db4
movq 0x30(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x8db6
testb $0x1, 0x7f(%rsp)
je 0x8dec
movq 0x98(%rsp), %rdi
callq 0x85b0
movq 0x30(%rsp), %rdi
movq %rax, %rsi
movq 0x90(%rsp), %rdx
movq 0x88(%rsp), %rcx
callq 0x9a80
jmp 0x8e91
testb $0x1, 0x70(%rsp)
je 0x8e42
movq 0x68(%rsp), %rdi
callq 0x85b0
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x98(%rsp), %rdi
callq 0x85b0
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rcx
movq 0x90(%rsp), %r8
movq 0x88(%rsp), %r9
callq 0x9c20
jmp 0x8e8f
movq 0x68(%rsp), %rdi
callq 0x85b0
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x98(%rsp), %rdi
callq 0x85b0
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
movq 0x90(%rsp), %r8
movq 0x88(%rsp), %r9
callq 0xa510
jmp 0x8e91
addq $0xa8, %rsp
retq
nopl (%rax)