# Path: androguard/decompiler/dad/graph.py
# class Graph:
# class GenInvokeRetName:
#     def __init__(self):
#     def sucs(self, node):
#     def all_sucs(self, node):
#     def preds(self, node):
#     def all_preds(self, node):
#     def add_node(self, node):
#     def add_edge(self, e1, e2):
#     def add_catch_edge(self, e1, e2):
#     def remove_node(self, node):
#     def number_ins(self):
#     def get_ins_from_loc(self, loc):
#     def get_node_from_loc(self, loc):
#     def remove_ins(self, loc):
#     def compute_rpo(self):
#     def post_order(self):
#         def _visit(n, cnt):
#     def draw(self, name, dname, draw_branches=True):
#     def immediate_dominators(self):
#     def __len__(self):
#     def __repr__(self):
#     def __iter__(self):
# def split_if_nodes(graph):
# def simplify(graph):
# def dom_lt(graph):
#     def _dfs(v, n):
#     def _compress(v):
#     def _eval(v):
#     def _link(v, w):
# def bfs(start):
#     def __init__(self):
#     def new(self):
#     def set_to(self, ret):
#     def last(self):
# def make_node(graph, block, block_to_node, vmap, gen_ret):
# def construct(start_block, vmap, exceptions):


import sys
import unittest
from androguard.decompiler.dad import graph
            'z4': 'r',
            'z5': 'r'
        }
        self.graph.entry = 'r'
        self.graph.edges = edges
        self.graph.nodes = list(expected_dominators.keys())
        self.assertEqual(expected_dominators, self.graph.immediate_dominators())

    def testSecondGraph(self):
        edges = {
            'r': ['y1', 'x12'],
            'y1': ['y2', 'x11'],
            'y2': ['x21'],
            'x11': ['x12', 'x22'],
            'x12': ['x11'],
            'x21': ['x22'],
            'x22': ['x21']
        }
        expected_dominators = {
            'r': None,
            'y1': 'r',
            'y2': 'y1',
            'x11': 'r',
            'x12': 'r',
            'x21': 'r',
            'x22': 'r'
        }
        self.graph.entry = 'r'
        self.graph.edges = edges
        self.graph.nodes = list(expected_dominators.keys())

# Path: androguard/decompiler/dad/graph.py
# class Graph:
# class GenInvokeRetName:
#     def __init__(self):
#     def sucs(self, node):
#     def all_sucs(self, node):
#     def preds(self, node):
#     def all_preds(self, node):
#     def add_node(self, node):
#     def add_edge(self, e1, e2):
#     def add_catch_edge(self, e1, e2):
#     def remove_node(self, node):
#     def number_ins(self):
#     def get_ins_from_loc(self, loc):
#     def get_node_from_loc(self, loc):
#     def remove_ins(self, loc):
#     def compute_rpo(self):
#     def post_order(self):
#         def _visit(n, cnt):
#     def draw(self, name, dname, draw_branches=True):
#     def immediate_dominators(self):
#     def __len__(self):
#     def __repr__(self):
#     def __iter__(self):
# def split_if_nodes(graph):
# def simplify(graph):
# def dom_lt(graph):
#     def _dfs(v, n):
#     def _compress(v):
#     def _eval(v):
#     def _link(v, w):
# def bfs(start):
#     def __init__(self):
#     def new(self):
#     def set_to(self, ret):
#     def last(self):
# def make_node(graph, block, block_to_node, vmap, gen_ret):
# def construct(start_block, vmap, exceptions):


# Path: tests/dominator_test.py
import sys
import unittest
from androguard.decompiler.dad import graph

            'z4': 'r',
            'z5': 'r'
        }
        self.graph.entry = 'r'
        self.graph.edges = edges
        self.graph.nodes = list(expected_dominators.keys())
        self.assertEqual(expected_dominators, self.graph.immediate_dominators())

    def testSecondGraph(self):
        edges = {
            'r': ['y1', 'x12'],
            'y1': ['y2', 'x11'],
            'y2': ['x21'],
            'x11': ['x12', 'x22'],
            'x12': ['x11'],
            'x21': ['x22'],
            'x22': ['x21']
        }
        expected_dominators = {
            'r': None,
            'y1': 'r',
            'y2': 'y1',
            'x11': 'r',
            'x12': 'r',
            'x21': 'r',
            'x22': 'r'
        }
        self.graph.entry = 'r'
        self.graph.edges = edges
        self.graph.nodes = list(expected_dominators.keys())

        self.assertEqual(expected_dominators, self.graph.immediate_dominators())