(a) All persons who are found guilty of or plead guilty to any felony, the maximum penalty for which is less than life imprisonment, and all persons who are found guilty of or plead guilty to any misdemeanor are eligible for probation, notwithstanding the provisions of §61-11-18 and §61-11-19 of this code.
(b) The provisions of subsection (a) of this section to the contrary notwithstanding, any person who commits or attempts to commit a felony with the use, presentment, or brandishing of a firearm is not eligible for probation. Nothing in this section may apply to an accessory before the fact or a principal in the second degree who has been convicted as if he or she were a principal in the first degree if, in the commission of or in the attempted commission of the felony, only the principal in the first degree used, presented, or brandished a firearm.
(c)(1) The existence of any fact which would make any person ineligible for probation under subsection (b) of this section because of the commission or attempted commission of a felony with the use, presentment, or brandishing of a firearm may not be applicable unless the fact is clearly stated and included in the indictment or presentment by which that person is charged and is either:
(A) Found by the court upon a plea of guilty or nolo contendere; or