First-principles modeling of the hydrogen evolution reaction and its application in electrochemical corrosion of Mg. (15th January 2020)