@Override
	public long readSyscallNumber(PcodeExecutorState<byte[]> state, Reason reason) {
		return Utils.bytesToLong(state.getVar(regRAX, reason), regRAX.getNumBytes(),
			machine.getLanguage().isBigEndian());
	}
{@inheritDoc}

The dispatcher doesn't know where the system call number is stored. It relies on this method
to read that number from the state. Here we'll assume the target is x64 and RAX contains the
syscall number.
Ghidra/Features/SystemEmulation/ghidra_scripts/DemoSyscallLibrary.java