static ArrayList<SequenceSearchState> buildTransitionLevel(ArrayList<SequenceSearchState> prev,
			int pos) {
		ArrayList<SequenceSearchState> res = new ArrayList<SequenceSearchState>();
		Iterator<SequenceSearchState> iterator = prev.iterator();
		while (iterator.hasNext()) {			// For each current state
			SequenceSearchState next = iterator.next();
			next.trans = new SequenceSearchState[256];
			for (int i = 0; i < 256; ++i) {		// Try every byte transition
				next.buildSingleTransition(res, pos, i);
			}
		}
		if (res.isEmpty()) {
			return res;
		}
		// Prepare to dedup the states
		Collections.sort(res);
		ArrayList<SequenceSearchState> finalres = new ArrayList<SequenceSearchState>();
		Iterator<SequenceSearchState> iter = res.iterator();
		SequenceSearchState curpat = iter.next();
		finalres.add(curpat);
		while (iter.hasNext()) {
			SequenceSearchState nextpat = iter.next();
			int comp = curpat.compareTo(nextpat);
			if (comp == 0) {		// Identical states
				curpat.merge(nextpat);
			}
			else {
				curpat = nextpat;
				finalres.add(curpat);
			}
		}
		return finalres;
	}
Build a new transition level for the state machine

@param prev previous search sequences
@param pos position within the search sequence state for this level
@return list of possible new search states to be added to the state machine
Ghidra/Features/Base/src/main/java/ghidra/util/bytesearch/SequenceSearchState.java