SIXTH AMENDED AND RESTATED NOTE PURCHASE AGREEMENT