middlegame
Yep, middlegame.
However, comparing those two, I'd say endgame. At the 2000+ level players are good enough to survive the opening, and it's much more often that games go to the endgame.