AMENDED AND RESTATED LOAN AND SECURITY AGREEMENT DATED AS OF AUGUST 13, 1999