From first hand experience, big companies are hiring constantly from overseas to the US. If you can pass the interview, they will figure out how to legally get you on payroll. If you are flexible in which countries you will work, so much the better.
However, when you apply to big companies, don't go in saying "I want to be a senior engineer". That means different things at different companies. Quora has some great answers on how the ladders work at the big players; you will see that "Senior" can mean 10+ years of experience at some places. Feel free to send me an email if you want more info about one of the places you mentioned.
From first hand experience, I was in the same situation as you right now (unknown H1B and OPT expiring) when Google interviewed me (it did not work out, for reason I don't believe have anything to do with visa). The recruiter knew about it, and both times I talked to them it wasn't an issue.
Additionally, my friend actually interviewed with another company (wasn't Google or Amazon, but the big one in Menlo Park). He was hired, and they gave him a choice to move to another country as needed.
In general, I think they will try to transfer you to another country. The main issue is that the specific country could be limited, and you might not really have a choice as to which country it is.
Is this from first hand experience or from the general understanding of how they work ?