US stocks held back by energy companies' struggles

US stock indexes were mixed on Wednesday as energy companies declined along with oil prices but technology stocks rose and reversed some of their recent losses.
After O'Reilly Automotive reported weak sales growth in the second quarter, the three biggest losers on the Standard & Poor's 500 index were all auto parts companies.