// File: benjibc[P]json-universal-container/./boost_file/boost/container/vector.hpp
// Function: boost::container::vector<JSON, std::allocator<JSON>>::priv_range_insert_new_allocation(JSON*, unsigned long, JSON*, unsigned long, boost::container::container_detail::advanced_insert_aux_int<JSON*>&)
void priv_range_insert_new_allocation
      (T* new_start, size_type new_cap, T* pos, size_type n, advanced_insert_aux_int_t &interf)
   {
      //n can be zero, if we want to reallocate!
      T *new_finish = new_start;
      T *old_finish;
      //Anti-exception rollbacks
      typename value_traits::ArrayDeallocator scoped_alloc(new_start, this->alloc(), new_cap);
      typename value_traits::ArrayDestructor constructed_values_destroyer(new_start, this->alloc(), 0u);

      //Initialize with [begin(), pos) old buffer
      //the start of the new buffer
      T *old_buffer = container_detail::to_raw_pointer(this->members_.m_start);
      if(old_buffer){
         new_finish = ::boost::container::uninitialized_move_alloc
            (this->alloc(), container_detail::to_raw_pointer(this->members_.m_start), pos, old_finish = new_finish);
         constructed_values_destroyer.increment_size(new_finish - old_finish);
      }
      //Initialize new objects, starting from previous point
      interf.uninitialized_copy_remaining_to(old_finish = new_finish);
      new_finish += n;
      constructed_values_destroyer.increment_size(new_finish - old_finish);
      //Initialize from the rest of the old buffer,
      //starting from previous point
      if(old_buffer){
         new_finish = ::boost::container::uninitialized_move_alloc
            (this->alloc(), pos, old_buffer + this->members_.m_size, new_finish);
         //Destroy and deallocate old elements
         //If there is allocated memory, destroy and deallocate
         if(!value_traits::trivial_dctr_after_move)
            this->destroy_n(old_buffer, this->members_.m_size);
         this->alloc().deallocate(this->members_.m_start, this->members_.m_capacity);
      }
      this->members_.m_start     = new_start;
      this->members_.m_size      = new_finish - new_start;
      this->members_.m_capacity  = new_cap;
      //All construction successful, disable rollbacks
      constructed_values_destroyer.release();
      scoped_alloc.release();
   }

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movq %r8, 0x90(%rsp)
movq %r9, 0x88(%rsp)
movq 0xb0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0x85a0
movq 0x18(%rsp), %rsi
movq %rax, %rdx
movq 0xa0(%rsp), %rcx
leaq 0x60(%rsp), %rdi
callq 0xaff0
movq 0x20(%rsp), %rdi
movq 0xa8(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x85a0
movq 0x28(%rsp), %rsi
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %ecx
leaq 0x48(%rsp), %rdi
callq 0xadd0
jmp 0xa5bf
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0x85b0
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0xa692
movq 0x20(%rsp), %rdi
callq 0x85a0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rsp)
movq (%rax), %rdi
callq 0x85b0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x98(%rsp), %rdx
movq 0x80(%rsp), %rcx
movq %rcx, 0x78(%rsp)
callq 0xab50
movq %rax, 0x10(%rsp)
jmp 0xa625
movq 0x10(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rax
subq %rax, %rsi
sarq $0x4, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
leaq 0x48(%rsp), %rdi
callq 0xb030
jmp 0xa660
jmp 0xa692
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
jmp 0xa80a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0xaef0
jmp 0xa80a
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq %rsi, 0x78(%rsp)
movq (%rdi), %rax
movq 0x8(%rax), %rax
callq *%rax
jmp 0xa6b2
movq 0x90(%rsp), %rcx
movq 0x80(%rsp), %rax
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rax
subq %rax, %rsi
sarq $0x4, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
leaq 0x48(%rsp), %rdi
callq 0xb030
jmp 0xa703
cmpq $0x0, 0x30(%rsp)
je 0xa793
movq 0x20(%rsp), %rdi
callq 0x85a0
movq %rax, %rdi
movq 0x20(%rsp), %rax
movq 0x98(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x8(%rax), %rax
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
addq %rax, %rdx
movq 0x80(%rsp), %rcx
callq 0xab50
movq %rax, (%rsp)
jmp 0xa750
movq 0x20(%rsp), %rdi
movq (%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x30(%rsp), %rsi
movq 0x8(%rdi), %rdx
callq 0xae90
jmp 0xa771
movq 0x20(%rsp), %rdi
callq 0x85a0
movq %rax, %rdi
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq 0x10(%rax), %rdx
callq 0xb050
jmp 0xa791
jmp 0xa793
movq 0x20(%rsp), %rax
movq 0xa8(%rsp), %rcx
movq %rcx, (%rax)
movq 0x80(%rsp), %rcx
movq 0xa8(%rsp), %rdx
subq %rdx, %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq 0xa0(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x48(%rsp), %rdi
callq 0xae10
leaq 0x60(%rsp), %rdi
callq 0xb080
jmp 0xa7ee
leaq 0x48(%rsp), %rdi
callq 0xaef0
leaq 0x60(%rsp), %rdi
callq 0xb0a0
addq $0xb8, %rsp
retq
leaq 0x60(%rsp), %rdi
callq 0xb0a0
movq 0x40(%rsp), %rdi
callq 0x33e0
nop