(self, jumptable_entries, node_a_block_addrs: Set[int],
                                                     known_node_addrs: Set[int], node_a_addr: int,
                                                     node_b_addr: int)
return False
Check if all entries in the given jump table exist in the given set of nodes of a SequenceNode.

        :param jumptable_entries:   Addresses of jump table entries.
        :param node_a_block_addrs:  A set of addresses for nodes that belong to Node A.
        :return:                    True if the check passes, False otherwise.
Check if all entries in the given jump table exist in the given set of nodes of a SequenceNode.
Check if all entries in the given jump table exist in the given set of nodes of a SequenceNode .
def _switch_check_existence_of_jumptable_entries(self, jumptable_entries, node_a_block_addrs: Set[int],
                                                     known_node_addrs: Set[int], node_a_addr: int,
                                                     node_b_addr: int) -> bool:
        """
        Check if all entries in the given jump table exist in the given set of nodes of a SequenceNode.

        :param jumptable_entries:   Addresses of jump table entries.
        :param node_a_block_addrs:  A set of addresses for nodes that belong to Node A.
        :return:                    True if the check passes, False otherwise.
        """

        all_node_addrs = node_a_block_addrs | known_node_addrs | {node_b_addr}
        expected_node_a_addrs = set()
        for entry_addr in jumptable_entries:
            if entry_addr in all_node_addrs:
                expected_node_a_addrs.add(entry_addr)
                continue
            # the entry may go missing if the entire node has been folded into its successor node.
            # in this case, we check if (a) this entry node has only one successor, and (b) this successor exists in
            # seq_node_addrs.
            if self.function is not None:
                entry_node = self.function.get_node(entry_addr)
                if entry_node is not None:
                    successors = [ ]
                    for _, dst, data in self.function.graph.out_edges(entry_node, data=True):
                        if data.get("type", "transition") != "call":
                            successors.append(dst)
                    if len(successors) == 1:
                        # found the single successor
                        if successors[0].addr in all_node_addrs:
                            expected_node_a_addrs.add(successors[0].addr)
                            continue
            # failed the check
            return False

        # finally, make sure all nodes under node A have been accounted for
        if node_a_block_addrs.issubset(expected_node_a_addrs | {node_a_addr}):
            return True

        # not sure what is going on...
        return False
def _switch_check_existence_of_jumptable_entries ( self , jumptable_entries , node_a_block_addrs : Set [ int ] , known_node_addrs : Set [ int ] , node_a_addr : int , node_b_addr : int ) -> bool : all_node_addrs = node_a_block_addrs | known_node_addrs | { node_b_addr } expected_node_a_addrs = set ( ) for entry_addr in jumptable_entries : if entry_addr in all_node_addrs : expected_node_a_addrs . add ( entry_addr ) continue # the entry may go missing if the entire node has been folded into its successor node. # in this case, we check if (a) this entry node has only one successor, and (b) this successor exists in # seq_node_addrs. if self . function is not None : entry_node = self . function . get_node ( entry_addr ) if entry_node is not None : successors = [ ] for _ , dst , data in self . function . graph . out_edges ( entry_node , data = True ) : if data . get ( "type" , "transition" ) != "call" : successors . append ( dst ) if len ( successors ) == 1 : # found the single successor if successors [ 0 ] . addr in all_node_addrs : expected_node_a_addrs . add ( successors [ 0 ] . addr ) continue # failed the check return False # finally, make sure all nodes under node A have been accounted for if node_a_block_addrs . issubset ( expected_node_a_addrs | { node_a_addr } ) : return True # not sure what is going on... return False