In the second example, there is no revaluation reserve and insufficient profits to support the dividend which is debited to profits to produce negative retained earnings.
In the first example, the company does not have sufficient profits in its accounts to support a dividend but has a revaluation reserve which is debited with the distribution.