@Override
	public int compareTo(SequenceSearchState o) {
		int i = 0;
		for (;;) {
			if (possible.size() <= i) {
				if (o.possible.size() <= i) {
					return 0;
				}
				return -1;
			}
			if (o.possible.size() <= i) {
				return 1;
			}
			int indus = possible.get(i).getIndex();		// Lexicographic compare an sequence of sequences
			int indthem = o.possible.get(i).getIndex();
			if (indus != indthem) {
				return (indus < indthem) ? -1 : 1;
			}
			i += 1;
		}
	}
Sort the sequences that have been added
Ghidra/Features/Base/src/main/java/ghidra/util/bytesearch/SequenceSearchState.java