US stock markets end week mixed amid Middle East uncertainty