private HashMap<Register, Integer> getRegisterIndexMap(List<Object> rawRepresentationList) {
		HashMap<Register, Integer> regIndexMap = new HashMap<>();
		int size = rawRepresentationList.size();
		for (int i = 0; i < size; i++) {
			Object obj = rawRepresentationList.get(i);
			if (obj instanceof Register) {
				// same register multiple times is an odd situation - not handled
				// implementation assumes we will never ever see the same register 3 or more times in same operand
				Register reg = (Register) obj;
				if (regIndexMap.remove(reg) == null) {
					regIndexMap.put(reg, i);
				}
			}
		}
		return regIndexMap;
	}
Build register index map based upon a raw operand representation list
where the index corresponds to the index within the list.

@param rawRepresentationList
@return register index map
Ghidra/Features/Base/src/main/java/ghidra/program/model/listing/CodeUnitFormat.java