S&P 500 stages late recovery as tech rout deepens, energy up 2%