code: private void linkLast(E e) {
          final Node<E> newNode = new Node<E>(Objects.requireNonNull(e));
  
          restartFromTail:
          for (;;)
              for (Node<E> t = tail, p = t, q;;) {
                  if ((q = p.next) != null &&
                      (q = (p = q).next) != null)
                      // Check for tail updates every other hop.
                      // If p == q, we are sure to follow tail instead.
                      p = (t != (t = tail)) ? t : q;
                  else if (p.prev == p) // NEXT_TERMINATOR
                      continue restartFromTail;
                  else {
                      // p is last node
                      newNode.lazySetPrev(p); // CAS piggyback
                      if (p.casNext(null, newNode)) {
                          // Successful CAS is the linearization point
                          // for e to become an element of this deque,
                          // and for newNode to become "live".
                          if (p != t) // hop two nodes at a time
                              casTail(t, newNode);  // Failure is OK.
                          return;
                      }
                      // Lost CAS race to another thread; re-read next
                  }
              }
      }
docs: Links e as last element.