private PatternMatchType getMatchType(Program program, Address funcStart,
			ContextRegisterFilter cRegFilter) {
		if (cRegFilter != null) {
			boolean passes = passesFilter(program, funcStart, cRegFilter);
			if (!passes) {
				return PatternMatchType.CONTEXT_CONFLICT;
			}
		}

		//pattern in defined data: false positive
		CodeUnit cu = program.getListing().getCodeUnitContaining(funcStart);
		if (cu instanceof Data) {
			if (((Data) cu).isDefined()) {
				return PatternMatchType.FP_DATA;
			}
		}

		//pattern at the start of a function: true positive
		if (program.getFunctionManager().getFunctionAt(funcStart) != null) {
			return PatternMatchType.TRUE_POSITIVE;
		}

		//does the match occur in undefined bytes?
		if (program.getListing().getInstructionContaining(funcStart) == null) {
			return PatternMatchType.POSSIBLE_START_UNDEFINED;
		}
		//the match occurs in an instruction.  is it aligned?
		Instruction instruction = program.getListing().getInstructionAt(funcStart);
		if (instruction == null) {
			return PatternMatchType.FP_MISALIGNED;
		}

		BasicBlockModel bModel = new BasicBlockModel(program);
		CodeBlock cBlock;

		boolean initialBlock = bModel.isBlockStart(instruction);
		//the instruction is at the start of a block.  Does anything flow into it?
		if (initialBlock) {
			try {
				cBlock = bModel.getCodeBlockAt(funcStart, TaskMonitor.DUMMY);
				CodeBlockReferenceIterator refIter = bModel.getSources(cBlock, TaskMonitor.DUMMY);
				if (refIter != null) {
					while (refIter.hasNext()) {
						CodeBlockReference cbRef = refIter.next();
						//TODO: is this sufficient? switch tables?
						if (!cbRef.getFlowType().equals(RefType.UNCONDITIONAL_JUMP)) {
							initialBlock = false;
						}
					}
				}
			}
			catch (CancelledException e) {
				//can't happen from the dummy monitor
			}
		}
		//it's a defined instruction: is it within a block, or a block start?
		if (initialBlock) {
			return PatternMatchType.POSSIBLE_START_CODE;
		}
		return PatternMatchType.FP_WRONG_FLOW;
	}
Evaluate a set of patterns
@param rows patterns to evaluate
@return statistics about the pattern matches
Ghidra/Features/BytePatterns/src/main/java/ghidra/bitpatterns/gui/ClipboardPanel.java