SECOND AMENDED AND RESTATED CREDIT AGREEMENT dated as of June 30, 2017 among