US stocks end mixed; tech stocks in red