@Test
	void foldVarAndFlow() {
		String asm = """
				.method public static example ()I {
				    code: {
				    A:
				        iconst_m1
				        istore foo
				        iconst_0
				        istore foo
				    B:
				        iload foo
				        ifeq C
				        iload foo
				        ireturn
				    C:
				        iload foo
				        ireturn
				    D:
				    }
				}
				""";
		validateAfterAssembly(asm, List.of(
				VariableFoldingTransformer.class,
				OpaquePredicateFoldingTransformer.class,
				StackOperationFoldingTransformer.class,
				GotoInliningTransformer.class
		), dis -> {
			assertEquals(1, StringUtil.count("iconst", dis), "Expected only one const");
			assertEquals(1, StringUtil.count("ireturn", dis), "Expected only one return");
			assertEquals(0, StringUtil.count("ifeq", dis), "Expected to fold opaque ifeq");
			assertEquals(0, StringUtil.count("foo", dis), "Expected to fold redundant variable declaration");
		});
	}
Chose case {@link VariableFoldingTransformer} along with other flow-based cleanup transformers.
recaf-core/src/test/java/software/coley/recaf/services/deobfuscation/FoldingDeobfuscationTest.java