protected void addImpl(int index, int sublistIndex, int sublistOffset, T item) {
    if (sublistIndex < headSublistIndex + (calculateSublistsUsed() >>> 1)) {
      if (index == 0) {
        addFirst(item);
      } else {
        CircularListInternal<T> prev = sublists.get(headSublistIndex);
        if (sublistOffset == 0) {
          sublistIndex -= 1;
          sublistOffset = sublists.get(sublistIndex).size() - 1;
        } else {
          sublistOffset -= 1;
        }
        T carryItem = prev.removeHead();
        CircularListInternal<T> next = prev;
        for (int j = headSublistIndex + 1; j <= sublistIndex; j++) {
          next = sublists.get(j);
          prev.addTail(next.removeHead());
          prev = next;
        }
        next.add(sublistOffset, item);
        addFirst(carryItem);
      }
    } else {
      if (index == size) {
        add(item);
      } else {
        CircularListInternal<T> prev = sublists.get(tailSublistIndex);
        T carryItem = prev.removeTail();
        CircularListInternal<T> next = prev;
        for (int j = tailSublistIndex - 1; j >= sublistIndex; j--) {
          next = sublists.get(j);
          prev.addHead(next.removeTail());
          prev = next;
        }
        next.add(sublistOffset, item);
        add(carryItem);
      }
    }
  }