(self)
return baseptr_restore_stmts
Find the AIL statement that restores the base pointer from a stack slot.

        :return:    A list of tuples, where each tuple is like (block_addr, statement_idx, load_src), or None if not
                    found.
        :rtype:     list|None
Find the AIL statement that restores the base pointer from a stack slot.
Find the AIL statement that restores the base pointer from a stack slot .
def _find_baseptr_restore_stmt(self):
        """
        Find the AIL statement that restores the base pointer from a stack slot.

        :return:    A list of tuples, where each tuple is like (block_addr, statement_idx, load_src), or None if not
                    found.
        :rtype:     list|None
        """

        endpoints = self._func.endpoints
        callouts_and_jumpouts = { n.addr for n in self._func.callout_sites + self._func.jumpout_sites }

        baseptr_restore_stmts = [ ]

        for endpoint in endpoints:
            for endpoint_block in self._get_blocks(endpoint.addr):
                for idx, stmt in enumerate(endpoint_block.statements):
                    if isinstance(stmt, ailment.Stmt.Assignment) \
                            and isinstance(stmt.dst, ailment.Expr.Register) \
                            and stmt.dst.reg_offset == self.project.arch.bp_offset \
                            and isinstance(stmt.src, ailment.Expr.Load) \
                            and isinstance(stmt.src.addr, ailment.Expr.StackBaseOffset):
                        baseptr_restore_stmts.append((endpoint_block, idx, stmt.src.addr))
                        break
                else:
                    if endpoint.addr not in callouts_and_jumpouts:
                        _l.debug("Could not find baseptr restoring statement in function %#x.", endpoint.addr)
                        return None
                    else:
                        _l.debug("No baseptr restoring statement is found at callout/jumpout site %#x. Might be expected.",
                                 endpoint.addr
                                 )

        return baseptr_restore_stmts
def _find_baseptr_restore_stmt ( self ) : endpoints = self . _func . endpoints callouts_and_jumpouts = { n . addr for n in self . _func . callout_sites + self . _func . jumpout_sites } baseptr_restore_stmts = [ ] for endpoint in endpoints : for endpoint_block in self . _get_blocks ( endpoint . addr ) : for idx , stmt in enumerate ( endpoint_block . statements ) : if isinstance ( stmt , ailment . Stmt . Assignment ) and isinstance ( stmt . dst , ailment . Expr . Register ) and stmt . dst . reg_offset == self . project . arch . bp_offset and isinstance ( stmt . src , ailment . Expr . Load ) and isinstance ( stmt . src . addr , ailment . Expr . StackBaseOffset ) : baseptr_restore_stmts . append ( ( endpoint_block , idx , stmt . src . addr ) ) break else : if endpoint . addr not in callouts_and_jumpouts : _l . debug ( "Could not find baseptr restoring statement in function %#x." , endpoint . addr ) return None else : _l . debug ( "No baseptr restoring statement is found at callout/jumpout site %#x. Might be expected." , endpoint . addr ) return baseptr_restore_stmts