The good news is that if you file bankruptcy, you will, most always, not lose your retirement savings. Some possible exceptions are if you put a very large amount of funds into the retirement or 401k just before filing bankruptcy or if the IRA is inherited. The federal bankruptcy exemption laws, and most state exemption laws, do protect your retirement savings from going to pay your creditors. A few years ago, the United States Supreme Court ruled that the retirement exemption is very broad and applies to most all types of retirement plans. This was great news for consumers. When you meet with an attorney, be sure to disclose all types of retirement plans that you currently have.
As with any issue involving bankruptcy or your finances that you are concerned about, I urge you to contact the nearest, well qualified bankruptcy attorney to answer your questions.