protected AssemblyResolutionResults applyPatterns(AssemblyConstructorSemantic sem, int shift,
			AssemblyResolutionResults temp) {
		DBG.println("Applying patterns:");
		Collection<AssemblyResolution> patterns =
			sem.getPatterns()
					.stream()
					.map(p -> p.shift(shift))
					.collect(Collectors.toList());
		return temp.apply(factory, new Applicator() {
			@Override
			public Iterable<AssemblyResolution> getPatterns(
					AssemblyResolvedPatterns cur) {
				return patterns;
			}

			@Override
			public AssemblyResolvedPatterns setRight(AssemblyResolvedPatterns res,
					AssemblyResolvedPatterns cur) {
				// This is typically applied by parent, so don't insert sibling
				return res;
			}

			@Override
			public String describeError(AssemblyResolvedPatterns rp, AssemblyResolution pat) {
				return "The patterns conflict " + pat.lineToString();
			}

			@Override
			public AssemblyResolvedPatterns combineBackfill(AssemblyResolvedPatterns cur,
					AssemblyResolvedBackfill bf) {
				throw new AssertionError();
			}

			@Override
			public AssemblyResolution finish(AssemblyResolvedPatterns resolved) {
				return resolved.checkNotForbidden();
			}
		});
	}
TODO: This is currently used only for resolving recursion. Could this be factored with
{@link AssemblyConstructState#resolvePatterns(AssemblyResolvedPatterns, Collection)}?
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/sem/AbstractAssemblyTreeResolver.java