public static Map<Long, Function> loadSyscallFunctionMap(Program program) {
		AddressSpace space = program.getAddressFactory().getAddressSpace(SYSCALL_SPACE_NAME);
		if (space == null) {
			throw new IllegalStateException(
				"No syscall address space in program. Please analyze the syscalls first.");
		}
		Map<Long, Function> result = new HashMap<>();
		SymbolIterator sit =
			program.getSymbolTable().getSymbolIterator(space.getMinAddress(), true);
		while (sit.hasNext()) {
			Symbol s = sit.next();
			if (s.getAddress().getAddressSpace() != space) {
				break;
			}
			if (s.getSymbolType() != SymbolType.FUNCTION) {
				continue;
			}
			result.put(s.getAddress().getOffset(), (Function) s.getObject());
		}
		return result;
	}
Scrape functions from the given program's "syscall" space.

@param program the program
@return a map of syscall number to function
Ghidra/Features/SystemEmulation/src/main/java/ghidra/pcode/emu/sys/EmuSyscallLibrary.java