In that second one, we can only debit the revaluation reserve with as large an amount as is already in the revaluation reserve
If the impairment is greater than previous revaluation surpluses not so far treated as realised, then any excess will be debited to statement of profit or loss