A man has admitted carrying out a brutal attack near a Greenock bar which left his victim lying motionless on a road in the early hours of the morning.