(A) Dismissal by the state. The state may by leave of court and in open court file an entry of dismissal of an indictment, information, or complaint and the prosecution shall thereupon terminate.(B) Dismissal by the court. If the court over objection of the state dismisses an indictment, information, or complaint, it shall state on the record its findings of fact and reasons for the dismissal.