private boolean addSymbolicRefs(boolean input, VarnodeContext context,
					Instruction instr, List<Object> list) {
				// get the value of the single register to see if this is the value desired
				if (singleRegister == null) {
					return false;
				}
				// check that the register is on the correct input/output list
				if (!list.contains(singleRegister)) {
					return false;
				}
				Varnode registerVarnodeValue = context.getRegisterVarnodeValue(singleRegister);
				if (!context.isSymbol(registerVarnodeValue) && !registerVarnodeValue.isRegister()) {
					return false;
				}
				Address symAddr = registerVarnodeValue.getAddress();
				if (symAddr == context.BAD_ADDRESS) {
					return false;
				}

				String valStr = "";
				if (registerVarnodeValue.isRegister()) {
					valStr = context.getRegister(registerVarnodeValue).toString();
				}
				else {
					// is an offset from a space
					String name = symAddr.getAddressSpace().getName();
					BigInteger offset = symAddr.getOffsetAsBigInteger();
					valStr = name + " + 0x" + offset.toString(16);
				}
				Address lastSetLocation = context.getLastSetLocation(singleRegister, null);

				String comment = instr.getComment(CommentType.EOL);
				if (comment == null) {
					comment = "";
				}

				String inoutChar = (input ? " " : "\'");
				String lastStr = (lastSetLocation != null ? " @" + lastSetLocation : "");

				String markup = singleRegister + inoutChar + "= " + valStr + lastStr;
				if (comment.replace('\'', ' ').contains(markup.replace('\'', ' '))) {
					return false;
				}
				comment = (comment.trim().length() == 0 ? markup : comment + "\n" + markup);
				instr.setComment(CommentType.EOL, comment);
				return false;
			}
Check the current operand for references based on input/outputs

@param context - context holding values
@param instr - instruction under consideration
@param list - input/output lists
@param opIndex - index of operand to check

@return true if a reference was found
Ghidra/Features/Base/ghidra_scripts/MultiInstructionMemReference.java