It's legal to renegotiate the contract after an inspection depending on the amount and severity of repairs. It's a contingency in the offer. Size up the situation and decide if coming down on price is fair or if perhaps you can make some of the repairs they're requesting yourself to save money. A lot depends on the final net amount you'll be receiving. Is it fair? Low? High? You'll have to weigh up the entire situation and details.
Hopefully both of you can come to a meeting of the minds and make it work. You don't have to accept any of their terms, but working with them to at least come to a fair agreement regarding repairs, etc., is probably in your best interest. Also think about losing them at this point. How much you'd lose in mortgage payments while the home goes back on the market and possibly getting a lower offer down the road which may cost you even more. Once the home is inspected and you have information about serious repairs needed, you should disclose them to any future, potential buyer. So if the repairs are necessary, you will have to make them or negotiate them in the future anyway.
Best of luck to you. I hope you have a good agent who is skilled in negotiating.