SECOND AMENDED AND RESTATED MASTER REPURCHASE AGREEMENT (the “Agreement”) among BANK OF AMERICA, N.A. (“Buyer”); LOANDEPOT BA WAREHOUSE, LLC (“Seller”) and LOANDEPOT.COM, LLC (“Guarantor” and “Pledgor”) dated as of August 20, 2021