public int getAddressSpace(String name,int bitSize) {
		int spaceID;
		AddressSpace regSpace = addrFactory.getAddressSpace(name);
		if (regSpace == null) {
			// don't allow symbolic spaces smaller than a pointer so the offset value can hold a pointer
			// TODO: This probably isn't quite right, the offset address space in theory should only be
			//       the size of the register that is getting an offset.  The register could be a
			//       small 8-bit register used as an offset from a larger value to get a pointer.
			int spaceBitSize = bitSize < pointerBitSize ? pointerBitSize : bitSize;
			regSpace = ((OffsetAddressFactory) addrFactory).createNewOffsetSpace(name,spaceBitSize);
		}
		if (regSpace == null) {
			if (!hitMaxAddressSpaces) {
				Msg.error(this, "VarnodeContext: out of address spaces at @" + currentAddress +
					" for: " + name);
				hitMaxAddressSpaces = true;
			}
			return BAD_SPACE_ID_VALUE;
		}
		spaceID = regSpace.getSpaceID();
		return spaceID;
	}
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