private AddressSet getInstructionSet(Program program, AddressSetView functionSet,
			Listing listing, Symbol tocSymbol, TaskMonitor monitor) {
		AddressSet instructionSet = new AddressSet();
		FunctionIterator functions = listing.getFunctions(functionSet, true);
		Register r2 = program.getRegister("r2");
		BigInteger val = BigInteger.valueOf(tocSymbol.getAddress().getOffset());
		RegisterValue regVal = new RegisterValue(r2, val);
		while (functions.hasNext()) {
			if (monitor.isCancelled()) {
				break;
			}
			Function function = functions.next();
			try {
				program.getProgramContext().setRegisterValue(function.getEntryPoint(),
					function.getEntryPoint(), regVal);
			}
			catch (ContextChangeException e) {
				// should never happen when changing r2 register
			}
			instructionSet.add(function.getBody());
		}
		return instructionSet;
	}
Creates a address set consisting of the function bodies of each
function entry point specified in the function address set.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/PefAnalyzer.java