I encountered this same situation and was able to get back to a base level using Heimdall on Mac OS X El Capitan 10.11.2. However, if I am able to somehow circumvent this step and install a CyanogenMod (nightly build), I would prefer that, instead.) (My first priority is to get the phone back to it's original running condition. I require very specific directions on where to obtain each component, and exactly how to go about restoring this device.
However, with so many versions of Odin, as well as the firmware builds available, not to mention the options and toggles available within Odin, I have no way of knowing if I'm doing this correctly. I downloaded Odin and a Samsung S4 firmware image, and attempted to flash it, but received a FAIL error towards the end. I have tried using Kies v.2.6, as well as v.3. On the top left of the screen, the following information is displayed: Please select recovery mode in Kies & try again." This message is prominently displayed underneath a "device to PC connection" graphic.