I agree with the prevailing opinion so far that the amp is more important.
Having said that, I have some experience with the components you mentioned, and if it were me, I would prefer the Anthem Statement D2 over the Anthem AVM50 for sound quality, and I would be willing to offset the additional expense of the D2 by buying a somewhat lesser amp, namely the Anthem Statement A5, rather than the P5 you mentioned. In my experience, the A5 and P5 sound very similar, though obviously the P5 is considerably more powerful. But if the A5 is powerful enough to meet your needs, I would buy it and use the savings to purchase the D2.
Good luck.
Having said that, I have some experience with the components you mentioned, and if it were me, I would prefer the Anthem Statement D2 over the Anthem AVM50 for sound quality, and I would be willing to offset the additional expense of the D2 by buying a somewhat lesser amp, namely the Anthem Statement A5, rather than the P5 you mentioned. In my experience, the A5 and P5 sound very similar, though obviously the P5 is considerably more powerful. But if the A5 is powerful enough to meet your needs, I would buy it and use the savings to purchase the D2.
Good luck.