public Varnode getEndRegisterVarnodeValue(Register reg, Address fromAddr, Address toAddr,
			boolean signed) {
		
		if (!trackStartEndState) {
			throw new UnsupportedOperationException("Must construct class with trackStartEndState == true");
		}
		
		if (reg == null) {
			return null;
		}

		Varnode rvnode = trans.getVarnode(reg);
		
		TraceDepthState traceDepthState = addrEndState.get(toAddr);
		if (traceDepthState == null) {
			return null;
		}
		
		Stack<HashMap<Address, Varnode>> state = traceDepthState.state();
		int backupDepth = state.size() - traceDepthState.depth();
		
		Varnode value = getMemoryValue(state, backupDepth, rvnode, signed);

		int sizeNeeded = reg.getBitLength() / 8;

		// lucky, got location and full size looking for
		if (value != null && (value.getSize() == sizeNeeded || value.getSize() == 0)) {
			return value;
		}

		return null;
	}
Get the value (value, space, size) of a register at the end of the last execution
flow taken for the instruction at toAddr.

Note: This can only be called if trackStartEndState flag is true.

@param reg register to retrieve the end value
@param fromAddr flow from address (not used currently, future use to retrieve multiple flows)
@param toAddr address of instruction to retrieve the register flow state
@param signed is the value signed or unsigned, will sext the top bit based on value size

@return instruction end state value for register, or null if no known state

@throws UnsupportedOperationException trackStartEndState == false at construction
Ghidra/Features/Base/src/main/java/ghidra/program/util/VarnodeContext.java