@Nonnull
	private static String toString(@Nonnull Instruction insn) {
		// Special cases that don't have dedicated printer methods exposed in JASM.
		if (insn instanceof LineInstruction line)
			return "line " + line.line;
		else if (insn instanceof FrameInstruction)
			return "// frame";

		// Collect label names from the instruction.
		Map<Integer, String> labelNames;
		if (insn instanceof LabelInstruction label) {
			int index = label.getIndex();
			labelNames = Map.of(index, "L" + index);
		} else if (insn instanceof BranchInstruction branch) {
			labelNames = branch.targetsStream()
					.collect(Collectors.toMap(Label::getIndex, l -> "L" + l.getIndex(), (a, b) -> a));
		} else {
			labelNames = Collections.emptyMap();
		}

		PrintContext<?> ctx = new PrintContext<>("");
		ctx.setForceWholeNumberRepresentation(true);
		Variables emptyVariables = new Variables(Collections.emptyNavigableMap(), Collections.emptyList());
		InstructionPrinter printer = new InstructionPrinter(ctx.code(), null, emptyVariables, labelNames);

		int op = insn.opcode();
		if (insn instanceof LabelInstruction label) {
			printer.label(label);
		} else if (op >= 0 && op <= ExtensionOpcodes.PRIMITIVE_CONVERSION) {
			ExecutionEngines.execute(printer, insn);
		} else {
			// The current search models shouldn't yield anything aside from the above types.
			return "<missing text mapper: " + insn.getClass().getSimpleName() + ":" + op + ">";
		}

		// Cut off first 2 chars of unused indentation then cap off the max length.
		return ctx.toString().substring(2).replace('\n', ' ');
	}
@param insn
		BLW instruction.

@return JASM text representation of BLW instruction.
recaf-core/src/main/java/software/coley/recaf/util/BlwUtil.java