public static String recoverConditionFromBreakpoint(Tree tree) {
		try {
			var l = new Object() {
				Tree cond;
				String labelId;
			};
			match(tree, SleighParser.OP_SEMANTIC, wantIf -> {
				match(wantIf, SleighParser.OP_IF, cond -> {
					l.cond = cond;
				}, wantGotoLabel -> {
					match(wantGotoLabel, SleighParser.OP_GOTO, wantJumpDest -> {
						match(wantJumpDest, SleighParser.OP_JUMPDEST_LABEL, wantLabel -> {
							match(wantLabel, SleighParser.OP_LABEL, wantId -> {
								match(wantId, SleighParser.OP_IDENTIFIER, id -> {
									l.labelId = getIdentifier(id);
								});
							});
						});
					});
				});
			}, wantApplyEmuSwi -> {
				match(wantApplyEmuSwi, SleighParser.OP_APPLY, wantId -> {
					match(wantId, SleighParser.OP_IDENTIFIER, id -> {
						matchIdentifier(id, "emu_swi");
					});
				});
			}, wantLabel -> {
				match(wantLabel, SleighParser.OP_LABEL, wantId -> {
					match(wantId, SleighParser.OP_IDENTIFIER, id -> {
						matchIdentifier(id, l.labelId);
					});
				});
			}, wantApplyEmuExecDecoded -> {
				match(wantApplyEmuExecDecoded, SleighParser.OP_APPLY, wantId -> {
					match(wantId, SleighParser.OP_IDENTIFIER, id -> {
						matchIdentifier(id, "emu_exec_decoded");
					});
				});
			});
			return generateSleighExpression(notTree(l.cond));
		}
		catch (MismatchException e) {
			return null;
		}
	}
Check if the given tree represents a conditional breakpoint, and recover that condition

@param tree the result of parsing a semantic block
@return the condition if matched, null otherwise
Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/SleighUtils.java