Title: Probing adsorbate-surface chemical bonds using ab initio techniques combined with x-ray spectroscopy