Stocks end flat; oil prices fall on US pullout from Iran deal