private static boolean replaceIntIntValue(@Nonnull InsnList instructions,
	                                          @Nonnull AbstractInsnNode stackValueProducerInsnA,
	                                          @Nonnull AbstractInsnNode stackValueProducerInsnB,
	                                          @Nonnull ReValue stackTopValueA,
	                                          @Nonnull ReValue stackTopValueB,
	                                          @Nonnull JumpInsnNode jump,
	                                          @Nonnull BiPredicate<IntValue, IntValue> gotoCondition) {
		if (stackTopValueA instanceof IntValue intValueA && stackTopValueB instanceof IntValue intValueB) {
			AbstractInsnNode replacement = gotoCondition.test(intValueA, intValueB) ?
					new JumpInsnNode(GOTO, jump.label) :
					new InsnNode(NOP);
			instructions.set(jump, replacement);
			instructions.set(stackValueProducerInsnA, new InsnNode(NOP));
			instructions.set(stackValueProducerInsnB, new InsnNode(NOP));
			return true;
		}
		return false;
	}
A transformer that folds opaque predicates into single-path control flows.

@author Matt Coley
recaf-core/src/main/java/software/coley/recaf/services/deobfuscation/transform/generic/OpaquePredicateFoldingTransformer.java