protected static ConstructState getPureRecursion(ConstructState state) {
		// NB. There can be other operands, but only one can be printed
		// Furthermore, nothing else can be printed, whether an operand or not
		List<String> pieces = state.getConstructor().getPrintPieces();
		if (pieces.size() != 1) {
			return null;
		}
		int opIdx = getOpIndex(pieces.get(0));
		if (opIdx < 0) {
			return null;
		}
		ConstructState sub = state.getSubState(opIdx);
		if (sub == null || sub.getConstructor() == null ||
			sub.getConstructor().getParent() != state.getConstructor().getParent()) {
			// not recursive
			return null;
		}
		return sub;
	}
If the construct state is a {@code ^instruction} or other purely-recursive constructor, get
its single child.

@param state the parent state
@return the child state if recursive, or null
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/sem/DefaultAssemblyResolvedPatterns.java