The present invention relates to compounds of formula (I), wherein X, R1, R2, R3, R4, R5, m, and n are defined in the specification are TRPV1 antagonists. Compositions comprising such compounds and methods for treating conditions and disorders using such compounds and compositions are also disclosed.