(self, seq: SequenceNode, node_a, node_b_addr: int, jumptable_entries,
                                     addr2nodes: Dict[int,Any])
return False, None
We might have already structured the actual body of the switch-case structure into a single Sequence node (node
        A). If that is the case, we un-structure the sequence node in this method.

        :param seq:                 The original Sequence node.
        :param node_a:              Node A.
        :param node_b_addr:         Address of node B.
        :param jumptable_entries:   Addresses of indirect jump targets in the jump table.
        :param addr2nodes:          A dict of addresses to their corresponding nodes in `seq`.
        :return:                    A boolean value indicating the result and an updated node_a. The boolean value is
                                    True if unpacking is not necessary or we successfully unpacked the sequence node,
                                    False otherwise.
        :rtype:                     bool
We might have already structured the actual body of the switch-case structure into a single Sequence node (node
        A). If that is the case, we un-structure the sequence node in this method.
We might have already structured the actual body of the switch - case structure into a single Sequence node ( node A ) . If that is the case we un - structure the sequence node in this method .
def _switch_unpack_sequence_node(self, seq: SequenceNode, node_a, node_b_addr: int, jumptable_entries,
                                     addr2nodes: Dict[int,Any]):
        """
        We might have already structured the actual body of the switch-case structure into a single Sequence node (node
        A). If that is the case, we un-structure the sequence node in this method.

        :param seq:                 The original Sequence node.
        :param node_a:              Node A.
        :param node_b_addr:         Address of node B.
        :param jumptable_entries:   Addresses of indirect jump targets in the jump table.
        :param addr2nodes:          A dict of addresses to their corresponding nodes in `seq`.
        :return:                    A boolean value indicating the result and an updated node_a. The boolean value is
                                    True if unpacking is not necessary or we successfully unpacked the sequence node,
                                    False otherwise.
        :rtype:                     bool
        """

        if isinstance(node_a.node, SequenceNode):
            node_a_block_addrs = {n.addr for n in node_a.node.nodes}
        else:
            node_a_block_addrs = set()
        #
        # if that is the case, we un-structure it here
        if all(entry_addr in addr2nodes for entry_addr in jumptable_entries):
            return True, node_a
        elif self._switch_check_existence_of_jumptable_entries(jumptable_entries, node_a_block_addrs,
                                                               set(addr2nodes.keys()), node_a.addr, node_b_addr):
            # unpacking is needed
            for n in node_a.node.nodes:
                if isinstance(n, ConditionNode):
                    if n.true_node is not None and n.false_node is None:
                        the_node = CodeNode(n.true_node, n.condition)
                        addr2nodes[n.addr] = the_node
                        seq.add_node(the_node)
                    elif n.false_node is not None and n.true_node is None:
                        the_node = CodeNode(n.false_node, n.condition)
                        addr2nodes[n.addr] = the_node
                        seq.add_node(the_node)
                    else:
                        # unsupported. bail
                        return False, None
                else:
                    the_node = CodeNode(n, None)
                    addr2nodes[n.addr] = the_node
                    seq.add_node(the_node)
            if node_a != addr2nodes[node_a.addr]:
                # update node_a
                seq.remove_node(node_a)
                node_a = addr2nodes[node_a.addr]
            return True, node_a

        # not sure what's going on... give up on this case
        return False, None
def _switch_unpack_sequence_node ( self , seq : SequenceNode , node_a , node_b_addr : int , jumptable_entries , addr2nodes : Dict [ int , Any ] ) : if isinstance ( node_a . node , SequenceNode ) : node_a_block_addrs = { n . addr for n in node_a . node . nodes } else : node_a_block_addrs = set ( ) # # if that is the case, we un-structure it here if all ( entry_addr in addr2nodes for entry_addr in jumptable_entries ) : return True , node_a elif self . _switch_check_existence_of_jumptable_entries ( jumptable_entries , node_a_block_addrs , set ( addr2nodes . keys ( ) ) , node_a . addr , node_b_addr ) : # unpacking is needed for n in node_a . node . nodes : if isinstance ( n , ConditionNode ) : if n . true_node is not None and n . false_node is None : the_node = CodeNode ( n . true_node , n . condition ) addr2nodes [ n . addr ] = the_node seq . add_node ( the_node ) elif n . false_node is not None and n . true_node is None : the_node = CodeNode ( n . false_node , n . condition ) addr2nodes [ n . addr ] = the_node seq . add_node ( the_node ) else : # unsupported. bail return False , None else : the_node = CodeNode ( n , None ) addr2nodes [ n . addr ] = the_node seq . add_node ( the_node ) if node_a != addr2nodes [ node_a . addr ] : # update node_a seq . remove_node ( node_a ) node_a = addr2nodes [ node_a . addr ] return True , node_a # not sure what's going on... give up on this case return False , None