Compounds of the formula I:
or pharmaceutically acceptable salts thereof,
wherein m, p, q, Ar, R
1
, R
2
, R
3
and R
4
are as defined herein. Also provided are methods for preparing, compositions comprising, and methods for using compounds of formula I.