private Address[] getFlowsAndPointersToInstruction(Instruction instr) {
		if (!followIntoFunction) {
			SymbolTable symbolTable = program.getSymbolTable();
			Symbol primarySymbol = symbolTable.getPrimarySymbol(instr.getMinAddress());
			if (primarySymbol != null && primarySymbol.getSymbolType() == SymbolType.FUNCTION) {
				// Not following into functions and we are at a function, so don't follow back.
				return new Address[0];
			}
		}

		Listing listing = program.getListing();
		ArrayList<Address> list = new ArrayList<Address>();
		ReferenceIterator referenceIteratorTo = instr.getReferenceIteratorTo();
		for (Reference reference : referenceIteratorTo) {
			RefType refType = reference.getReferenceType();
			if (followPointers && refType.isData()) {
				Address fromAddress = reference.getFromAddress();
				Data data = listing.getDataContaining(fromAddress);
				if (data == null) {
					continue;
				}
				Address minAddress = data.getMinAddress();
				int offset = (int) fromAddress.subtract(minAddress);
				Data primitive = data.getPrimitiveAt(offset);
				if ((primitive != null) && primitive.isPointer()) {
					// Add just address of the pointer?
					list.add(fromAddress);
				}
			}
			else if (refType.isFlow()) {
				if (shouldFollowFlow((FlowType) refType)) {
					Address fromAddress = reference.getFromAddress();
					list.add(fromAddress);
				}
			}
		}
		return list.toArray(new Address[list.size()]);
	}
Gets the addresses that flow to this instruction. Only flow types
matching the ones that should be followed will have the address it flows
from returned.

@param instr the instruction being flowed to.
@return array of the addresses that flow to the instruction in the manner we are
interested in.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/block/FollowFlow.java