public static RefType getDefaultRegisterRefType(CodeUnit cu, Register reg, int opIndex) {
		RefType rt = RefType.DATA;
		if (cu instanceof Instruction) {
			Instruction instr = (Instruction) cu;
			Object[] objs = instr.getResultObjects();
			for (Object obj : objs) {
				if (reg == obj) {
					rt = RefType.WRITE;
					break;
				}
			}
			objs = instr.getInputObjects();
			for (Object obj : objs) {
				if (reg == obj) {
					rt = (rt == RefType.WRITE) ? RefType.READ_WRITE : RefType.READ;
					break;
				}
			}
		}
		return rt;
	}
Get the default stack data RefType for the specified code-unit/opIndex and register
@param cu the code unit
@param reg the register
@param opIndex the op index
@return default RefType
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/symbol/RefTypeFactory.java