AMENDMENT NO. 3 TO AMENDED AND RESTATED MASTER REPURCHASE AGREEMENT AND SECURITIES CONTRACT