This is one where it may be worthwhile to pay an attorney to prepare a letter for you on their letterhead to demand your money back plus the amounts you paid for smog and repairs (for return of the car.) Unfortunately, it cannot be guaranteed that you would win a case due to the "as is" condition (regardless of the verbal warranties given.) You probably should have had a mechanic inspect it (at your cost) prior to purchsing it. If the value is less than $10,000 you can sue (after the demand letter) in small claims court. Good luck.
I am licensed in California only and my answers on Avvo assume California law. The above answer is for general information only and is based on the information you posted. Every case is fact dependent, so to get a thorough analysis of your situation, you will need to consult face to face with an attorney licensed to practice in the jurisdiction where the incident took place. Do not conclusively rely on any information posted online when deciding what to do about your case. No attorney-client relationship shall be created through the use reading of this response on Avvo. You should never delay seeking legal advice, disregard legal advice, or commence or discontinue any legal action because of information in this response.
Your issues are simple, here's why. A seller in CA may NOT sell an automobile without a proper smog certificate. It is the seller's duty to do so. This duty can not be contracted around, ie, they cannot promise you that it will pass smog. They have to do the smog themselves PRIOR to the sale, period. Here is my recent blog on this point.
While we could make quite a few claims here, you are entitled to a rescission based solely on this rule of law. Feel free to contact my office should you need more help making this work. We handle these types of claims statewide.