public void copy(Varnode out, Varnode in, boolean mustClearAll, ContextEvaluator evaluator) {
		Varnode val1 = null;
		// if just a copy of itself, do nothing
		if (out.equals(in)) {
			return;
		}
		val1 = getValue(in, evaluator);
		// if truncating a constant get a new constant of the proper size
		if (val1 != null && in.getSize() > out.getSize()) {
			if (isConstant(val1)) {
				val1 = createVarnode(val1.getOffset(), val1.getSpace(), out.getSize());
			}
		}

		if (!in.isRegister() || !out.isRegister()) {
			// normal case easy get value, put value
			putValue(out, val1, mustClearAll);
			return;
		}
		if (mustClearAll) {
			clearVals.add(out);
		}

		putValue(out, val1, mustClearAll);
	}
Copy the varnode with as little manipulation as possible.
Try to keep whatever partial state there is intact if a real value isn't required.

@param out varnode to put it in
@param in varnode to copy from.
@param mustClearAll true if must clear if value is not unique
@param evaluator user provided evaluator if needed
Ghidra/Features/Base/src/main/java/ghidra/program/util/VarnodeContext.java