public final void clearOldNodes(int i) {
        if (Class142_Sub8_Sub31.softReferenceFactory != null) {
            for (ReferenceHolder referenceHolder = (ReferenceHolder) list.getTail(); referenceHolder != null; referenceHolder = (ReferenceHolder) list.getPrev()) {
                if (referenceHolder.isSoft()) {
                    if (referenceHolder.getObject() == null) {
                        referenceHolder.unlink();
                        referenceHolder.unlinkSub();
                        spaceLeft++;
                    }
                } else if (++referenceHolder.subID > (long) i) {
                    ReferenceHolder referenceHolder_1 = Class142_Sub8_Sub31.softReferenceFactory.createReferenceHolder(referenceHolder);
                    cache.insertNode(referenceHolder_1, ((Node) (referenceHolder)).id);
                    Class6.insertBehind(referenceHolder_1, referenceHolder);
                    referenceHolder.unlink();
                    referenceHolder.unlinkSub();
                }
            }

        }
    }