(A) When the same conduct of a defendant may establish the commission of more than one offense, the defendant may be prosecuted for each such offense.
(B) If the several offenses are known to the proper prosecuting officer at the time of the commencing the prosecution and are within the jurisdiction of a single court, they must be prosecuted in a single prosecution, except as provided in division (C) below, if they are based on the same act.
(C) When two or more offenses are charged as required by division (B) above, the court, in the interest of justice, may order that one or more of the charges shall be tried separately.
(ILCS Chapter 720, Act 5, § 3-3) (1981 Code, § 42.03, 3-3)