@Nonnull
	public static Instruction convert(@Nonnull AbstractInsnNode insn) {
		return switch (insn) {
			case LdcInsnNode ldc -> Util.wrapLdcInsn(ldc.cst);
			case MethodInsnNode min -> Util.wrapMethodInsn(min.getOpcode(), min.owner, min.name, min.desc, false);
			case FieldInsnNode fin -> Util.wrapFieldInsn(fin.getOpcode(), fin.owner, fin.name, fin.desc);
			case TypeInsnNode tin -> Util.wrapTypeInsn(tin.getOpcode(), tin.desc);
			case IntInsnNode iin -> Util.wrapIntInsn(iin.getOpcode(), iin.operand);
			case InsnNode in -> Util.wrapInsn(in.getOpcode());
			case InvokeDynamicInsnNode indy -> Util.wrapInvokeDynamicInsn(indy.name, indy.desc, indy.bsm, indy.bsmArgs);
			case VarInsnNode vin -> new VarInstruction(insn.getOpcode(), vin.var);
			case IincInsnNode iin -> new VariableIncrementInstruction(iin.var, iin.incr);
			case JumpInsnNode jin -> {
				int offset = AsmInsnUtil.indexOf(jin.label);
				Label label = new GenericLabel();
				label.setIndex(offset);
				yield jin.getOpcode() == Opcodes.GOTO ?
						new ImmediateJumpInstruction(insn.getOpcode(), label) :
						new ConditionalJumpInstruction(insn.getOpcode(), label);
			}
			case TableSwitchInsnNode tsin -> {
				int min = tsin.min;
				Label dflt = new GenericLabel();
				dflt.setIndex(AsmInsnUtil.indexOf(tsin.dflt));
				List<Label> targets = tsin.labels.stream().map(l -> {
					Label target = new GenericLabel();
					target.setIndex(AsmInsnUtil.indexOf(l));
					return target;
				}).toList();
				yield new TableSwitchInstruction(min, dflt, targets);
			}
			case LookupSwitchInsnNode lsin -> {
				int[] keys = lsin.keys.stream().mapToInt(i -> i).toArray();
				Label dflt = new GenericLabel();
				dflt.setIndex(AsmInsnUtil.indexOf(lsin.dflt));
				List<Label> targets = lsin.labels.stream().map(l -> {
					Label target = new GenericLabel();
					target.setIndex(AsmInsnUtil.indexOf(l));
					return target;
				}).toList();
				yield new LookupSwitchInstruction(keys, dflt, targets);
			}
			case LabelNode ln -> new LabelInstruction(AsmInsnUtil.indexOf(ln));
			case FrameNode fr -> new FrameInstruction();
			case LineNumberNode ln -> new LineInstruction(ln.line);
			default -> new SimpleInstruction(insn.getOpcode());
		};
	}
@param insn
		ASM instruction.

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