I have HTC one m8 right now and my friend for the samsung galaxy s5 and we compared the phones and seems like HTC one m8 better then the samsung with few things, and to be honest i'm so happy with it, In my opinion if you can offer for the M9 it would be great, other then i suggest HTC one m8.
However do not think about buying an iPhone, Before i bought my current phone, I've watched many videos which they compare phones to others and between then iPhone 6 and the samsung Galaxy s5, It appears that HTC better then those two phones, so yeah, At the end it's up to you, and as i suggest you above, HTC all the way.