In the event of a bankruptcy, how is recovery money allocated?

Local property taxes and other governmental service assessment liens have first priority, followed by any C-PACE payments in arrears, followed by any previously recorded mortgage lien on the property only if a written consent agreement is executed by the holder of each such previously recorded lien.