This is not legal advice and you will need to speak with an attorney regarding this matter. The final decision maker on the matter will be a small claims court judge, unless you paid over $10,000, in which case it will require a Superior Court filing.
Small claims court judges usually do not reverse the sale of a used "as-is" vehicle purchase unless the seller willfully and maliciously defrauded the buyer. California does require a seller to smog check their vehicle before it is sold, however it is rare that anyone gets prosecuted for violating this law. Most often these cases are handled in civil court, unless a more serious crime has also been committed alongside the purchase transaction.
Furthermore and unfortunately in this specific case, it might be difficult to prove when and why the vehicle broke down, since it passed a smog check after you purchased it.
If you feel the monetary amount is worth your while we recommend you speak with an expert attorney who deals with used vehicle purchases for legal advice and how and if you should proceed with any action.