public Varnode and(Varnode val1, Varnode val2, ContextEvaluator evaluator) {
		if (val1 == null || val2 == null) {
			return null;
		}
		if (val1.equals(val2)) {
			return val1;
		}
		if (isConstant(val1) || val1.isAddress()) {
			Varnode swap = val1;
			val1 = val2;
			val2 = swap;
		}
		int spaceID = val1.getSpace();
		long valbase = 0;
		if (isRegister(val1)) {
			Register reg = trans.getRegister(val1);
			if (reg == null) {
				return null;
			}
			spaceID = getAddressSpace(reg.getName(),reg.getBitLength());
			valbase = 0;
		}
		else if (val1.isConstant()) {
			valbase = val1.getOffset();
			if (!isSuspectConstant(val1)) {
				spaceID = val2.getSpace();
			}
		}
		else if (isSymbolicSpace(spaceID)) {
			valbase = val1.getOffset();
			if (val2.isConstant()) {
				Long val2Const = getConstant(val2, null);
				if (val2Const == null) {
					return null;
				}
				// check if the value could be an alignment mask from an unknown register
				if (((val2Const >> 1) << 1) != val2Const && ((val2Const >> 2) << 2) != val2Const) {
					return null;
				}
			}
		}
		else if (isExternalSpace(spaceID)) {
			return (val1); // can't mess with an external address
		}
		else {
			return null;
		}
		Long val2Const = getConstant(val2, null);
		if (val2Const == null) {
			return null;
		}
		long result = (valbase & val2Const) &
			(0xffffffffffffffffL >>> ((8 - val1.getSize()) * 8));
		return createVarnode(result, spaceID, val1.getSize());
	}
Add two varnodes together to get a new value
This could create a new space and return a varnode pointed into that space

@param val1 first value
@param val2 second value
@return varnode that could be a constant, or an offset into a space, or null
Ghidra/Features/Base/src/main/java/ghidra/program/util/VarnodeContext.java