AMENDED AND RESTATED INTERCOMPANY LOAN AGREEMENT