public AssemblyPatternBlock combine(AssemblyPatternBlock that) {
		int newOffset = Math.min(this.offset, that.offset);
		int buflen = Math.max(this.length(), that.length()) - newOffset;
		byte[] cmsk = new byte[buflen]; // To check for conflicts;

		int diff = this.offset - newOffset;
		for (int i = 0; i < this.mask.length; i++) {
			cmsk[diff + i] = this.mask[i];
		}
		diff = that.offset - newOffset;
		for (int i = 0; i < that.mask.length; i++) {
			cmsk[diff + i] &= that.mask[i];
		}
		byte[] chek = new byte[buflen];
		diff = this.offset - newOffset;
		for (int i = 0; i < this.vals.length; i++) {
			chek[diff + i] = (byte) (cmsk[diff + i] & this.vals[i]);
		}
		diff = that.offset - newOffset;
		for (int i = 0; i < that.vals.length; i++) {
			if (chek[diff + i] != (byte) (cmsk[diff + i] & that.vals[i])) {
				return null;
			}
		}

		byte[] newMask = new byte[buflen];
		byte[] newVals = new byte[buflen];

		diff = this.offset - newOffset;
		for (int i = 0; i < this.mask.length; i++) {
			newMask[diff + i] = this.mask[i];
			newVals[diff + i] = this.vals[i];
		}
		diff = that.offset - newOffset;
		for (int i = 0; i < that.mask.length; i++) {
			newMask[diff + i] |= that.mask[i];
			newVals[diff + i] |= that.vals[i];
		}

		return new AssemblyPatternBlock(newOffset, newMask, newVals);
	}
Combine this pattern block with another given block

<p>
Two blocks can be combined in their corresponding defined bits agree. When blocks are
combined, their bytes are aligned according to their shifts, and the defined bits are taken
from either block. If neither block defines a bit (i.e., the mask bit at that position is 0
for both input blocks, then the output has an undefined bit in the corresponding position. If
both blocks define the bit, but they have opposite values, then the result is an error.

@param that the other block
@return the new combined block, or null if the blocks disagree for any bit
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/sem/AssemblyPatternBlock.java