private Node tryAppend(Node s,boolean haveData){
  for (Node t=tail, p=t; ; ) {
    Node n, u;
    if (p == null && (p=head) == null) {
      if (casHead(null,s))       return s;
    }
 else     if (p.cannotPrecede(haveData))     return null;
 else     if ((n=p.next) != null)     p=p != t && t != (u=tail) ? (t=u) : (p != n) ? n : null;
 else     if (!p.casNext(null,s))     p=p.next;
 else {
      if (p != t) {
        while ((tail != t || !casTail(t,s)) && (t=tail) != null && (s=t.next) != null && (s=s.next) != null && s != t)         ;
      }
      return p;
    }
  }
}

private Node tryAppend ( Node s , boolean haveData ) { for ( Node t = tail , p = t ; ; ) { Node n , u ; if ( p == null && ( p = head ) == null ) { if ( casHead ( null , s ) ) return s ; } else if ( p . cannotPrecede ( haveData ) ) return null ; else if ( ( n = p . next ) != null ) p = p != t && t != ( u = tail ) ? ( t = u ) : ( p != n ) ? n : null ; else if ( ! p . casNext ( null , s ) ) p = p . next ; else { if ( p != t ) { while ( ( tail != t || ! casTail ( t , s ) ) && ( t = tail ) != null && ( s = t . next ) != null && ( s = s . next ) != null && s != t ) ; } return p ; } } }
tries to append node s as tail .
