US stocks rebound from early declines despite weak corporate earnings