private void storeRegisterValue(Register reg, BigInteger unsignedValue) {

		byte[] bytes = unsignedValue.toByteArray(); // most-significant-byte is in 0th element
		int bytesIndex = 0;
		if (bytes[0] == 0) {
			bytesIndex = 1;
		}
		Address baseAddr = reg.getAddress();
		int size = reg.getMinimumByteSize();
		byte signextend = (byte) ((unsignedValue.signum() < 0) ? -1 : 0);
		int lengthDiff = size - bytes.length + bytesIndex;

		for (int i = 0; i < size; i++) {
			byte val;
			if (lengthDiff > 0) {
				val = signextend;
				--lengthDiff;
			}
			else {
				val = bytes[bytesIndex++];
			}
			Varnode byteValue = new Varnode(addrFactory.getConstantAddress(val), 1);
			byteValue.trim();
			long byteOffset = language.isBigEndian() ? i : (size - i - 1);
			memoryMap.put(baseAddr.addWrap(byteOffset), byteValue);
		}
	}
Branch the current state.  The current state should be associated with
branch target, the returned state should be used for the fall-through flow.
@return
Ghidra/Features/Base/src/main/java/ghidra/util/state/ContextState.java