private SegmentCommand getContainingSegment(MachHeader header, long fileOffset) {
		for (SegmentCommand segment : header.getAllSegments()) {
			if (fileOffset >= segment.getFileOffset() &&
				fileOffset < segment.getFileOffset() + segment.getFileSize()) {
				return segment;
			}
		}
		return null;
	}
Gets the {@link SegmentCommand segment} that contains the give file offset

@param header The Mach-O header
@param fileOffset The file offset
@return The {@link SegmentCommand segment} that contains the give file offset, or null if
  one was not found
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/macho/commands/LoadCommand.java