legal ground
Article 1 13 of the Enterprise Bankruptcy Law of the People's Republic of China
After paying off the bankruptcy expenses and debts first, the bankruptcy property shall be paid off in the following order:
(1) Wages, medical care, disability allowance and pension expenses owed by the bankrupt to employees, basic old-age insurance and basic medical insurance expenses owed to employees' personal accounts, and compensation that should be paid to employees according to laws and administrative regulations;
(2) Social insurance premiums and taxes owed by the bankrupt other than those specified in the preceding paragraph;
(3) Ordinary bankruptcy claims.
If the bankruptcy property is insufficient to pay off the repayment requirements in the same order, it shall be distributed in proportion.
The wages of directors, supervisors and senior managers of bankrupt enterprises shall be calculated according to the average wages of employees of the enterprise.
Article 386 of the Civil Code
Unless otherwise provided by law, when the debtor fails to perform the due debt or the security interest agreed by the parties is realized, the holder of the security interest has the right to be paid in priority for the secured property.