AMENDED AND RESTATED FIRST AMENDMENT AND WAIVER