private boolean performScalarMarkup(Instruction inst, int opIndex, Function function,
			Reference primaryRef, Variable referencedVariable, Map<Register, Integer> regIndexMap,
			List<Object> representations) {

		InstructionScalarInfo info = new InstructionScalarInfo(representations, primaryRef);
		if (info.hasSingleAddressWithNoScalars()) {
			int addressIndex = info.getAddressIndex();
			return markupAddressAsRegister(inst, primaryRef, representations, addressIndex) ||
				markupAddressAsScalar(inst, primaryRef, representations, addressIndex);
		}

		if (info.hasNoScalars()) {
			return false;
		}

		Program program = inst.getProgram();
		List<Equate> equates = null;
		PcodeOp[] pcode = null;
		int size = representations.size();

		for (int i = 0; i < size; i++) {

			Scalar scalar = info.getScalar(i);
			if (scalar == null) {
				continue;
			}

			if (pcode == null) {
				pcode = inst.getPcode(opIndex);
			}

			Register operandRegister = findAssociatedOperandRegister(scalar, regIndexMap, pcode);
			if (operandRegister == null) {
				if (markupScalarWithMemoryReference(inst, scalar, i, primaryRef, representations)) {
					primaryRef = null; // reference consumed - continue handling other scalars
					referencedVariable = null; // we may accidentally consume referenced variable
					continue;
				}
			}
			else if (primaryRef != null && primaryRef.isStackReference()) {
				// Handle explicit stack reference
				// triggered only if scalar is associated with a register in the same operand
				if (markupScalarWithStackReference(scalar, i, primaryRef, referencedVariable,
					representations)) {
					regIndexMap.remove(operandRegister);
					return true;
				}
				return false; // no other mark-up to operand when stack reference applied
			}
			else if (isRegisterAssociatedWithReferencedVariable(referencedVariable,
				operandRegister)) {
				if (markupScalarWithReferencedRegisterVariable(scalar, i, primaryRef,
					referencedVariable, representations)) {
					primaryRef = null; // reference consumed - continue handling other scalars
					referencedVariable = null; // referenced variable consumed
					regIndexMap.remove(operandRegister);
					continue;
				}
			}
			else if (markupScalarWithMemoryReference(inst, scalar, i, primaryRef,
				representations)) {
				primaryRef = null;         // reference consumed - continue handling other scalars
				referencedVariable = null; // signal not to consume referenced variable
				continue;
			}
			else if (markupScalarWithImpliedRegisterVariable(inst, function, scalar, i,
				operandRegister, representations)) {
				regIndexMap.remove(operandRegister);
				continue;
			}

			if (equates == null) {
				equates = program.getEquateTable().getEquates(inst.getMinAddress(), opIndex);
			}
			markupScalarWithEquate(scalar, i, equates, representations);
		}
		return primaryRef == null;
	}
Attempt to markup any or all Scalars contained within the
representationList.

@param inst instruction
@param opIndex operand index
@param function function containing instruction
@param primaryRef primary reference
@param referencedVariable optional variable associated with reference
@param regIndexMap register index map
@param representations
@return true if primaryRef was included in scalar mark-up
Ghidra/Features/Base/src/main/java/ghidra/program/model/listing/CodeUnitFormat.java