US stocks end mixed amid Middle East tensions