realising the danger , he made a desperate effort to gain the shore , walking heavily against the swells , and at last , exhausted , stumbled from the brine , drenched through and wild with determination .