(725 ILCS 5/115-3) (from Ch. 38, par. 115-3)
    Sec. 115-3. Trial by the Court.
    (a) A trial shall be conducted in the presence of the defendant unless he waives the right to be present.
    (b) Upon conclusion of the trial the court shall enter a general finding, except that, when the affirmative defense of insanity has been presented during the trial and acquittal is based solely upon the defense of insanity, the court shall enter a finding of not guilty by reason of insanity. In the event of a finding of not guilty by reason of insanity, a hearing shall be held pursuant to the Mental Health and Developmental Disabilities Code to determine whether the defendant is subject to involuntary admission.
    (c) When the defendant has asserted a defense of insanity, the court may find the defendant guilty but mentally ill if, after hearing all of the evidence, the court finds that:
        (1) the State has proven beyond a reasonable doubt
    
that the defendant is guilty of the offense charged; and
        (2) the defendant has failed to prove his insanity as
    
required in subsection (b) of Section 3-2 of the Criminal Code of 2012 and subsections (a), (b) and (e) of Section 6-2 of the Criminal Code of 2012; and
        (3) the defendant has proven by a preponderance of
    
the evidence that he was mentally ill, as defined in subsections (c) and (d) of Section 6-2 of the Criminal Code of 2012 at the time of the offense.
(Source: P.A. 97-1150, eff. 1-25-13.)