For loans carried at the lower of cost or fair value, gains and losses on loan sales (sales proceeds minus carrying value) are recorded in noninterest income, and direct loan origination costs and fees are deferred at origination of the loan and are recognized in noninterest income upon sale of the loan.