private static CodeBlock getEntryBlock(Program program, Address address, TaskMonitor monitor)
			throws CancelledException {
		SimpleBlockModel simpleModel = new SimpleBlockModel(program);
		CodeBlock block = simpleModel.getFirstCodeBlockContaining(address, monitor);
		if (block == null || block.isEmpty()) {
			return null;
		}

		AddressSet visitedAddresses = new AddressSet();
		Deque<CodeBlock> worklist = new LinkedList<CodeBlock>();
		Address blockStart = block.getFirstStartAddress();
		visitedAddresses.addRange(blockStart, blockStart);
		worklist.add(block);
		while (!worklist.isEmpty()) {		// While there are blocks that haven't been examined yet
			CodeBlock curblock = worklist.poll();
			int count = 0;
			CodeBlockReferenceIterator iterator = curblock.getSources(monitor);
			while (iterator.hasNext() && !monitor.isCancelled()) {
				CodeBlockReference blockReference = iterator.next();
				FlowType flowType = blockReference.getFlowType();
				if (flowType.isCall()) {
					continue; // Don't follow call edges for within-function analysis
				}
				if (flowType.isIndirect()) {
					continue; // Don't follow improper use of Indirect reference
				}
				count += 1;	  // Count the existence of source that is NOT a call
				Address sourceAddr = blockReference.getSourceAddress();
				if (visitedAddresses.contains(sourceAddr)) {
					continue; // Already visited this block
				}
				visitedAddresses.addRange(sourceAddr, sourceAddr);
				worklist.add(blockReference.getSourceBlock());
			}
			if (count == 0) {
				return curblock;
			}
		}
		return null;
	}
Identifies a <code>UndefinedFunction</code> based on the location given based upon the current
listing disassembly at time of construction using a block model.
@param program program to be searched
@param address address within body of function
@param monitor task monitor
@return function or null if invalid parameters, not found, or cancelled
Ghidra/Features/Base/src/main/java/ghidra/util/UndefinedFunction.java