The avengers have no way of resisting professor X's mind control, So in all actuality their wouldn't even be a fight because professor X would just keep the avengers in check, and if it is a true fight to the death, Professor X could just use his machine to focuses on, and then kill the avengers, like how he almost killed everybody in the 2nd movie.
Honestly it's the Xmen that would kick some ass but hey that's just my opinion (it's also the right opinion!) I'll admit that the avengers are slightly more iconic but that's because the avengers appeal to the mainstream movie audiences but we're talking the whole history of the avengers and the Xmen (that includes comics ;)) so not just movies
I give this to the X-Men as the vastly out number the Avengers however this battle would simply depend on which roster of characters each team has. The X-Men and the Avengers have rotating rosters and the Avengers have many different teams such as the New Avengers, Mighty Avengers, Secret Avengers etc. In my opinion, most rosters of the X-Men seem to be much more powerful than those of the Avengers. But now we run into the problem of some X-Men also being Avengers, I can only assume that most of these characters will show loyalty to the first team they were in which would be the X-Men.
Many of the Avengers wanted to enact the SuperHuman Registration Act. (SHRA) Even Capt. America was seen enforcing the Metahuman Registration Act. That consolidation of power is dangerous. The registered files were then nearly made public or used by Osborn. We can not trust them with our safety. As for the fight.... X-Men now have plenty of mutants to recruit from thanks to Hope. Wolverine's failed assassination against the mutant messiah ought to foreshadow the end of this war.
The Avengers win... Simple, Most Xmen are avengers:
- Scarlet Witch
- Namor, the Sub-Mariner
So yea... They kinda null out all the powerful XMen, and that means the Avengers Overpower The Xmen.