public final List<Address> search(Program program, AddressRange addressRange,
			MaskSettings maskSettings) throws InvalidInputException {

		InstructionSearchData searchData = new InstructionSearchData();

		searchData.load(program, addressRange);

		if (maskSettings.isMaskOperands()) {
			searchData.maskAllOperands();
		}
		else {
			if (maskSettings.isMaskScalars()) {
				searchData.maskOperandsByType(OperandType.SCALAR);
			}
			if (maskSettings.isMaskAddresses()) {
				searchData.maskOperandsByType(OperandType.ADDRESS);
			}
		}

		// Now need to loop over all initialized memory ranges and search for results.  Add each
		// set of results to our InstructionMetadata list.
		List<InstructionMetadata> searchResults = new ArrayList<InstructionMetadata>();
		AddressRangeIterator rangeIter =
			program.getMemory().getLoadedAndInitializedAddressSet().getAddressRanges();

		while (rangeIter.hasNext()) {
			AddressRange range = rangeIter.next();
			searchResults.addAll(searchData.search(program, range, TaskMonitor.DUMMY));
		}

		return InstructionSearchUtils.toAddressList(searchResults);
	}
Searches the given program for the instructions specified by the given address range, with
masking set according to the given {@link MaskSettings} object

@param program
@param addressRange
@param maskSettings

@return a list of addresses indicating starting positions of matches.
@throws InvalidInputException
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/instructionsearch/InstructionSearchApi.java