private Varnode combineByteValues(Varnode[] byteValues, TaskMonitor monitor)
			throws CancelledException {

		ArrayList<Varnode> resultList = new ArrayList<Varnode>();
		Varnode v = byteValues[0];
		int nextIndex = 1;
		int size = 1;
		while (nextIndex < byteValues.length) {
			Varnode result = combineValues(byteValues[nextIndex], v);
			if (result == null) {
				resultList.add(v);
				v = byteValues[nextIndex++];
				size = 1;
			}
			else {
				v = result;
				++nextIndex;
				++size;
			}
		}
		resultList.add(v);

		// TODO: not all bytes are known - should we specify a mask of known bits/bytes

		Varnode result = resultList.get(0);
		int cnt = resultList.size();
		if (cnt == 1 || result == null) {
			return normalizeExpression(result, byteValues.length);
		}
		result = leftShiftExpression(result, 0, result.getSize(), monitor);
		for (int i = 1; i < cnt; i++) {
			Varnode next = resultList.get(i);
			if (next == null) {
				return null;
			}
			size = result.getSize() + next.getSize();
			next = leftShiftExpression(next, result.getSize(), size, monitor);

			Varnode[] inputs = new Varnode[] { zeroExtendExpression(result, size), next };
			PcodeOp op =
				new PcodeOp(Address.NO_ADDRESS, -1, PcodeOp.INT_ADD, inputs, new Varnode(
					Address.NO_ADDRESS, size));
			result = ResultsState.simplify(op, inputs, addrFactory, monitor);
			if (result == null) {
				result = new VarnodeOperation(op, inputs);
			}
		}
		return result;
	}
Combine byte values into a single varnode value.
@param byteValues bytes stored with LSB in bytes[0] and MSB in bytes[bytes.length-1] with correct endianness.
@return varnode or null
Ghidra/Features/Base/src/main/java/ghidra/util/state/ContextState.java