public MaskedLong invShiftRight(long n) throws SolverException {
		if (n == 0) {
			return this;
		}
		long checkVal = (Long.MIN_VALUE >> n) & val;
		long checkMsk = (Long.MIN_VALUE >> n) & msk;
		if (checkMsk == 0) { // All fallen bits and sign bit unknown
			return new MaskedLong(msk << n, val << n);
		}
		// All defined bits must match.
		// Additionally, if the resulting sign bit is undefined, but any fallen bit is defined,
		// then the sign bits is actually defined
		if (checkVal == 0) { // All known (of fallen and sign bits) zero
			return new MaskedLong(msk << n | Long.MIN_VALUE, val << n);
		}
		if (checkVal == checkMsk) { // All known (of fallen and sign bits) one
			return new MaskedLong(msk << n | Long.MIN_VALUE, val << n | Long.MIN_VALUE);
		}
		throw new SolverException(
			"Cannot invert arithmetic right shift where bits to the left disagree");
	}
Invert an arithmetic right shift of {@code n} positions, that is shift left

<p>
This is different from a normal shift left, in that it inserts unknowns at the right. The
normal left shift inserts zeros. Additionally, all bits that fall off the left must match the
resulting sign bit, or else the inversion is undefined.

@param n the number of positions
@return the result
@throws SolverException if the inversion is undefined
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/expr/MaskedLong.java