private void hashAllTheFunctions(Program program, FidHasher hasher,
			ArrayList<Function> theFunctions, Map<Function, FunctionRow> recordMap)
			throws CancelledException {
		DomainFile domainFile = program.getDomainFile();
		FunctionManager functionManager = program.getFunctionManager();
		FunctionIterator functions = functionManager.getFunctions(true);

		for (Function function : functions) {
			monitor.checkCancelled();
			if (functionIsExternal(function)) {
				continue;
			}

			theFunctions.add(function);

			String name = null;

			if (function.getSymbol().getSource() == SourceType.DEFAULT) {
				exclude(domainFile, function, FidPopulateResult.Disposition.NO_DEFINED_SYMBOL);
			}
			else {
				name = function.getSymbol().getName();
			}

			FidHashQuad hashQuad = null;
			FunctionRow functionRow = null;

			if (function.isThunk()) {
				if (name != null) {
//					theAdditionalLabels.put(function.getEntryPoint(), nameAndNamespace);
					exclude(domainFile, function, FidPopulateResult.Disposition.IS_THUNK);
				}
			}
			else if (name != null) {
				try {
					hashQuad = hasher.hash(function);
					if (hashQuad == null) {
						exclude(domainFile, function,
							FidPopulateResult.Disposition.FAILS_MINIMUM_SHORTHASH_LENGTH);
						continue;
					}

					if (functionFilter != null &&
						!functionFilter.test(new Pair<>(function, hashQuad))) {
						exclude(domainFile, function,
							FidPopulateResult.Disposition.FAILED_FUNCTION_FILTER);
						continue;
					}

					boolean hasTerminator = findTerminator(function, monitor);

					functionRow =
						new FunctionRow(domainFile, function, name, hashQuad, hasTerminator);
					recordMap.put(function, functionRow);

					result.disposition(domainFile, name, function.getEntryPoint(),
						Disposition.INCLUDED);
				}
				catch (MemoryAccessException e) {
					exclude(domainFile, function,
						FidPopulateResult.Disposition.MEMORY_ACCESS_EXCEPTION);
				}
			}
		}
	}
Hashes all the functions in the program for inserting into the database.
@param result the populate result
@param program the program
@param hasher the FID hasher
@param theFunctions the functions
@param recordMap the map of function to function records
@throws CancelledException if the user cancels
Ghidra/Features/FunctionID/src/main/java/ghidra/feature/fid/service/FidServiceLibraryIngest.java