(b) Upon default of a loan guaranteed under this subchapter and terminated pursuant to State law, a lender may file a claim under the guarantee for an amount not to exceed the lesser of
(1) the maximum guarantee; or
(2) the difference between
(A) the total outstanding obligation on the loan, including principal, interest, and expenses authorized by the loan documents, through the date of the public sale (as authorized under such documents and State law); and
(B) the amount realized at such sale.