public AssemblyPatternBlock getMaskedValue(byte[] unmasked) {
		assert offset + mask.length <= unmasked.length;
		var newVals = Arrays.copyOfRange(unmasked, offset, offset + mask.length);

		for (int i = 0; i < newVals.length; i++) {
			newVals[i] = (byte) ((newVals[i] & mask[i]) & 0xff);
		}

		return new AssemblyPatternBlock(offset, mask, newVals);
	}
Mask the given {@code unmasked} value with the mask contained in this pattern block.

<p>
The returned {@link AssemblyPatternBlock} has an identical mask as {@code this} but with a 
value taken from the given {@code unmasked}.

@param unmasked the value to be masked into the result
@return a combination of the given unmasked value and this mask
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/sem/AssemblyPatternBlock.java