You have several choices here.
1) Sue, claiming that the government can neither force you to design your software differently, nor require them to sell a specific software. It is a very different thing than the existing system where people are required to provide access to existing backdoors, rather than being required to create backdoors.
Except that now that Apple's warrant canary is gone, it appears they've been served secret orders, which could include such things, and not allow them to sue in public. So this choice is gone
2) Move your corporate headquarters off shore. Then tell them they have no authority over you, but if they want to sue your country or publicly demand you stop selling your product in the US, they can do it - but your warrant requiring secrecy does not affect them in any way shape or form.
This one is possible, but risky, as your competitors who are willing to sell out will gain an immense tactical advantage, especially in the US. The advantage increases even further as the government then stops being willing to share its intel with you that gives your coproration an advantage in the marketplace, but begins to provide your competitors with inside information about your company.
3) Separate the hardware and software, using different sub-companies to produce each one. Then have the software company declare it is hereby closed, and will provide no more updates. Tell the government that they can't force you to be in business anymore. Hire a new company to provide software and REPEAT.
Actually, Sony does something similar to this, using a vast web of companies and contractors. It seems to work pretty well for them, except that I think they also allow the local companies to share local intel/advantages with the host company. But it means that the US can't get Sony Electronics USA to do something that will affect Sony Electronics Japan or Sony Entertainment USA -- the co-operation would have to flow out of the country for this to work. It would really be in, say, Apple and Google's best interests to begin restructuring themselves in a similar manner -- but they'd have to move the parent corporations offshore, which would have its own issues.