@Override
	public boolean applyTo(Program p, TaskMonitor monitor) {
		program = p;

		Processor processor = program.getLanguage().getProcessor();
		AddressSpace defaultSpace = program.getLanguage().getDefaultSpace();
		if (defaultSpace.getSize() > 32 ||
			!processor.equals(Processor.findOrPossiblyCreateProcessor("x86"))) {
			Msg.error(this,
				"Unsupported operation for language " + program.getLanguage().getLanguageID());
			return false;
		}
		if (defaultSpace instanceof SegmentedAddressSpace) {	// For 16-bit x86, prepare to establish near/fear calling convention models
			setupNearFarModels();
		}

		AddressSetView set = entryPoints;

		long maxCount = set.getNumAddresses();

		monitor.setMaximum(maxCount);
		monitor.setProgress(0);

		for (Function function : program.getFunctionManager().getFunctions(entryPoints, true)) {
			if (monitor.isCancelled()) {
				break;
			}

			set = set.subtract(
				new AddressSet(program, entryPoints.getMinAddress(), function.getEntryPoint()));
			monitor.setProgress(maxCount - set.getNumAddresses());

			monitor.setMessage("Purge " + function.getName());

			try {
				analyzeFunction(function, monitor);
			}
			catch (CancelledException e) {
				// do nothing
			}
		}
		if (monitor.isCancelled()) {
			setStatusMsg("Function Purge analysis cancelled");
			return false;
		}
		return true;
	}
Constructs a new command for analyzing the Stack.
@param entries and address set indicating the entry points of functions that have 
stacks to be analyzed.
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/FunctionPurgeAnalysisCmd.java