SECOND AMENDED AND RESTATED CREDIT AGREEMENT dated as of July 24, 2017 among