static long getLongValue(Program program, Address entryAddr, int scaleFactor, int size,
			boolean signExtend) throws MemoryAccessException {
		byte[] bytes = new byte[size];
		Memory mem = program.getMemory();
		if (mem.getBytes(entryAddr, bytes) != size) {
			throw new MemoryAccessException("Failed to read table entry at: " + entryAddr);
		}
		long val = 0;
		if (program.getLanguage().isBigEndian()) {
			if (signExtend && (bytes[0] < 0)) {
				val = -1;
			}
			for (int i = 0; i < size; i++) {
				val = (val << 8) + ((long) bytes[i] & 0x0ff);
			}
		}
		else {
			if (signExtend && (bytes[size - 1] < 0)) {
				val = -1;
			}
			for (int i = size - 1; i >= 0; i--) {
				val = (val << 8) + ((long) bytes[i] & 0x0ff);
			}
		}
		return val * scaleFactor;
	}
Returns table entry value as pointer for specified caseIndexValue.
@param caseIndexValue index value for specific case
@return pointer loaded from the table entry in memory which corresponds to the specified caseIndexValue.
@throws MemoryAccessException
@throws AddressOutOfBoundsException
Ghidra/Features/Base/src/main/java/ghidra/util/state/analysis/TableEntry.java