Can be all of the above, usually though it's the first print but that doesn't mean the second print will be anywhere near the first so the first 10 second range can still be huge (if the market is volatile).
This is why the first print can say be 5800 (and you have an order to sell on the open) but your fill is at 5785. In such a case there's no point in arguing about a bad fill, it's just how things can be on the open and the fill will stand as opening orders usually have a 1-2 minute window to be filled.