private static String getDynamicInstructionName(Program program, Instruction instruction,
			Address address, int refLevel) {

		Address codeUnitAddress = instruction.getMinAddress();
		long diff = address.subtract(codeUnitAddress);
		if (diff != 0) {
			return getDyanmicOffcutInstructionName(instruction, codeUnitAddress, diff);
		}

		Function function = program.getFunctionManager().getFunctionAt(codeUnitAddress);
		if (function != null) {
			return DEFAULT_FUNCTION_PREFIX + getAddressString(codeUnitAddress);
		}

		if (refLevel == SUB_LEVEL) {
			return DEFAULT_SUBROUTINE_PREFIX + getAddressString(codeUnitAddress);
		}

		if (refLevel == EXT_LEVEL) {
			return DEFAULT_EXTERNAL_ENTRY_PREFIX + getAddressString(codeUnitAddress);
		}

		return DEFAULT_SYMBOL_PREFIX + getAddressString(codeUnitAddress);
	}
Create a name for a dynamic symbol.
@param program the current program
@param addr the address of the symbol for which to generate a name
@return a name for the symbol at the given address
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/SymbolUtilities.java