protected Map<AddressSpace, SemisparseByteArray> getPatches(Language language) {
		PcodeProgram prog = SleighProgramCompiler.compileProgram((SleighLanguage) language,
			"schedule", sleigh + ";", PcodeUseropLibrary.nil());
		// SemisparseArray is a bit overkill, no?
		Map<AddressSpace, SemisparseByteArray> result = new TreeMap<>();
		for (PcodeOp op : prog.getCode()) {
			// Only accept patches in form [mem/reg] = [constant], or goto [constant]
			switch (op.getOpcode()) {
				case PcodeOp.COPY -> {
					if (!getPatchCopyOp(language, result, op)) {
						return null;
					}
				}
				case PcodeOp.STORE -> {
					if (!getPatchStoreOp(language, result, op)) {
						return null;
					}
				}
				case PcodeOp.BRANCH -> {
					if (!getPatchBranchOp(language, result, op)) {
						return null;
					}
				}
				default -> {
					return null;
				}
			}
		}
		return result;
	}
Generate multiple lines of Sleigh, all to set a single variable

@param language the target language
@param address the (start) address of the variable
@param data the bytes to write to the variable
@return the lines of Sleigh code
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/time/schedule/PatchStep.java