(self, entry_addr: int, addr2nodes: Dict[int,Any])
return None
Find the correct node for a given jump table entry address in addr2nodes.

        This method is needed because prior optimization steps may remove some blocks (e.g., empty blocks or blocks that
        only have branch instructions). If the given jump table entry address corresponds to a removed block, it will
        not be found inside addr2nodes dict. In such cases, we need to follow graph edges in the CFG and find the first
        block whose address is inside addr2nodes dict.

        :param entry_addr:  Address of the jump table entry.
        :return:            The correct node if we can find it, or None if we fail to find one.
Find the correct node for a given jump table entry address in addr2nodes.
Find the correct node for a given jump table entry address in addr2nodes .
def _switch_find_jumptable_entry_node(self, entry_addr: int, addr2nodes: Dict[int,Any]) -> Optional[Any]:
        """
        Find the correct node for a given jump table entry address in addr2nodes.

        This method is needed because prior optimization steps may remove some blocks (e.g., empty blocks or blocks that
        only have branch instructions). If the given jump table entry address corresponds to a removed block, it will
        not be found inside addr2nodes dict. In such cases, we need to follow graph edges in the CFG and find the first
        block whose address is inside addr2nodes dict.

        :param entry_addr:  Address of the jump table entry.
        :return:            The correct node if we can find it, or None if we fail to find one.
        """

        if entry_addr in addr2nodes:
            return addr2nodes[entry_addr]
        # magic
        if self.function is None:
            return None

        addr = entry_addr
        node = self.function.get_node(addr)
        for _ in range(5):  # we try at most five steps
            if node is None:
                return None
            successors = [ ]
            for _, dst, data in self.function.graph.out_edges(node, data=True):
                if data.get('type', 'transition') != "call":
                    successors.append(dst)
            if len(successors) != 1:
                return None
            successor = successors[0]
            if successor.addr in addr2nodes:
                # found it!
                return addr2nodes[successor.addr]
            # keep looking
            node = successor
        return None
def _switch_find_jumptable_entry_node ( self , entry_addr : int , addr2nodes : Dict [ int , Any ] ) -> Optional [ Any ] : if entry_addr in addr2nodes : return addr2nodes [ entry_addr ] # magic if self . function is None : return None addr = entry_addr node = self . function . get_node ( addr ) for _ in range ( 5 ) : # we try at most five steps if node is None : return None successors = [ ] for _ , dst , data in self . function . graph . out_edges ( node , data = True ) : if data . get ( 'type' , 'transition' ) != "call" : successors . append ( dst ) if len ( successors ) != 1 : return None successor = successors [ 0 ] if successor . addr in addr2nodes : # found it! return addr2nodes [ successor . addr ] # keep looking node = successor return None