private void fixupPinnedFunctionSymbolAfterRebase(SymbolDB symbol, Address newAddress,
			Symbol match) {
		// since we are a function, we are not moving the symbol, so we must either pin a
		// matching symbol at the destination or create a new pinned label at the destination.
		if (match != null) {
			match.setPinned(true);
		}
		else {
			try {
				Symbol newLabel = createLabel(newAddress, symbol.getName(),
					symbol.getParentNamespace(), symbol.getSource());
				newLabel.setPinned(true);
			}
			catch (InvalidInputException e) {
				// can't happen, we already know it is valid
			}
		}

		// unpin the function symbol since it is not moving.
		symbol.setPinned(false);

		// now, either set the function to default or find another symbol to promote.
		String newName = "";
		Namespace newNamespace = namespaceMgr.getGlobalNamespace();
		SourceType newSource = SourceType.DEFAULT;
		Symbol symbolToPromote = findSymbolToPromote(symbol.getAddress());
		if (symbolToPromote != null) {
			newName = symbolToPromote.getName();
			newNamespace = symbolToPromote.getParentNamespace();
			newSource = symbolToPromote.getSource();
			symbolToPromote.delete();
		}
		try {
			symbol.setNameAndNamespace(newName, newNamespace, newSource);
		}
		catch (DuplicateNameException | InvalidInputException | CircularDependencyException e) {
			// can't happen
		}
	}
Checks if the givens symbols from the same address have exactly one primary symbol amongst
them

@param symbols the array of symbols at a an address
@return true if there is exactly one primary symbol at the address (also true if no symbols
        at address)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/SymbolManager.java