public static boolean isMachoPrelink(ByteProvider provider, TaskMonitor monitor) {
		try {
			MachHeader header = new MachHeader(provider);
			boolean hasPrelinkSegment = new MachHeader(provider).parseSegments()
					.stream()
					.anyMatch(segment -> segment.getSegmentName().startsWith("__PRELINK"));
			boolean hasFileSet = header.parseAndCheck(LoadCommandTypes.LC_FILESET_ENTRY);
			return hasPrelinkSegment && !hasFileSet;
		}
		catch (MachException | IOException e) {
			// Assume it's not a Mach-O PRELINK...fall through
		}
		return false;
	}
Check to see if the given {@link ByteProvider} is a Mach-O PRELINK binary.
<p>
NOTE: This method will return false if the binary is a Mach-O file set.

@param provider The {@link ByteProvider} to check
@param monitor A monitor
@return True if the given {@link ByteProvider} is a Mach-O PRELINK binary; otherwise, false
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MachoPrelinkUtils.java