def is_irreversible(self, move: Move) -> bool:
        """
        Checks if the given pseudo-legal move is irreversible.

        In standard chess, pawn moves, captures and moves that destroy castling
        rights are irreversible.
        """
        backrank = BB_RANK_1 if self.turn == WHITE else BB_RANK_8
        cr = self.clean_castling_rights() & backrank
        return bool(self.is_zeroing(move) or
                    cr and BB_SQUARES[move.from_square] & self.kings & ~self.promoted or
                    cr & BB_SQUARES[move.from_square] or
                    cr & BB_SQUARES[move.to_square])
Checks if the given pseudo-legal move is irreversible.

        In standard chess, pawn moves, captures and moves that destroy castling
        rights are irreversible.