A compound of formula I: or an enantiomer or diastereomer, or a pharmaceutically acceptable salt thereof, wherein: R 1 is -C 1 - 6 alkyl, cycloalkyl, or heterocycloalkyl; each R 2 is independently -H, -halo, -OH, -CN, -NH 2, -NO 2, -C 1 - 6 alkyl, or -C 1 - 6 alkoxy; wherein m is 0, 1, 2, 3, or 4; p is 0, 1 or 2; R 3 is -H or -C 1 - 6 alkyl; R 4 is -H, cycloalkyl, or -C 1 - 6 alkyl; R 5 and R 6 are each independently -H or -C 1 - 6 alkyl; Ar is aryl or heteroaryl; X is -C(R 7 R 7')-; Y is -C(R 8 R 8')-, -O-, -N(R 10)-, -C(=O)-, -SO 2 -, or -SO 2 R 12; Z is -[C(R 9 R 9')] n -; wherein n is 1, 2, 3, or 4; or X and Y together form -(R 7)C=C(R 8)-; L is -S-, -O-, -C(=O)R 11 -, -C(=O)OR 11 -, -N(R 11)-, -C(=O)N(R 11)-, -C(=O)N(R 11)-C 1 - 4 alkyl-, -N(R 11)C(=O)-, -N(R 11)C(=O)-C 1 - 4 alkyl-, -SO 2 N(R 11)-, or -N(R 11)SO 2 -; each R 7, R 7', R 8, R 8', R 9 and R 9' is independently selected from: 1) -H, 2) -C 1 - 6 alkyl, 3) -cycloalkyl, 4) -heterocycloalkyl, 5) -OR 12, 6) -N(R 12) 2, 7) -NR 11 C(=O)R 12, 8) -NR 11 C(=O)OR 12, 9) -NR 11 C(=O)N(R 12) 2, 10) -NR 11 SO 2 R 12, 11) -NR 11 SO 2 N(R 12) 2, 12) -C(=O)R 12, 13) -C(=O)O(C 1 - 6 alkyl), 14) -C(=O)N(R 12) 2, 15) -SO 2 R 12, 16) -SO 2 N(R 12) 2, 17) -aryl, and 18) -heteroaryl; R 10 is -H, -C 1 - 6 alkyl, -cycloalkyl, heterocycloalkyl, -C(=O)R 12, -C(=O)OR 12, -C(=O)N(R 12) 2, -SO 2 R 12, -SO 2 N(R 12) 2, aryl, or heteroaryl; each R 11 is independently -H or -C 1 - 6 alkyl; and each R 12 is independently -H, -C 1 - 6 alkyl, -C 1 - 6 alkoxy, -cycloalkyl, heterocycloalkyl, aryl, or heteroaryl; wherein at each occurrence alkyl is substituted with 0, 1, 2, 3, or 4 substituents selected from the group consisting of halo, -oxo, -OH, -CN, -NH 2, -NO 2, -SO 2 (C 1 - 6 alkyl), -C 1 - 6 alkoxy, -cycloalkyl, -heterocycloalkyl, aryl, and heteroaryl; wherein at each occurrence cycloalkyl and heterocycloalkyl are substituted with 0, 1, 2, 3, or 4 substituents selected from the group consisting of halo, -oxo, -OH, -CN, -NH 2, -NO 2, -C 1 - 6 alkyl, -SO 2 (C 1 - 6 alkyl), -CO(C 1 - 6 alkyl), -C 1 - 6 alkoxy, aryl, and heteroaryl; wherein at each occurrence aryl and heteroaryl are substituted with 0, 1, 2, or 3 substituents selected from the group consisting of halo, -OH, -CN, -NH 2, NO 2, -NH(C 1 - 6 alkyl), -N(C 1 - 6 alkyl) 2, -C 1 - 6 alkyl, -cycloalkyl, -heterocycloalkyl, and -C 1 - 6 alkoxy. R 1 is -C 1 - 6 alkyl, cycloalkyl, or heterocycloalkyl; each R 2 is independently -H, -halo, -OH, -CN, -NH 2, -NO 2, -C 1 - 6 alkyl, or -C 1 - 6 alkoxy; wherein m is 0, 1, 2, 3, or 4; p is 0, 1 or 2; R 3 is -H or -C 1 - 6 alkyl; R 4 is -H, cycloalkyl, or -C 1 - 6 alkyl; R 5 and R 6 are each independently -H or -C 1 - 6 alkyl; Ar is aryl or heteroaryl; X is -C(R 7 R 7')-; Y is -C(R 8 R 8')-, -O-, -N(R 10)-, -C(=O)-, -SO 2 -, or -SO 2 R 12; Z is -[C(R 9 R 9')] n -; wherein n is 1, 2, 3, or 4; or X and Y together form -(R 7)C=C(R 8)-; L is -S-, -O-, -C(=O)R 11 -, -C(=O)OR 11 -, -N(R 11)-, -C(=O)N(R 11)-, -C(=O)N(R 11)-C 1 - 4 alkyl-, -N(R 11)C(=O)-, -N(R 11)C(=O)-C 1 - 4 alkyl-, -SO 2 N(R 11)-, or -N(R 11)SO 2 -; each R 7, R 7', R 8, R 8', R 9 and R 9' is independently selected from: 1) -H, 2) -C 1 - 6 alkyl, 3) -cycloalkyl, 4) -heterocycloalkyl, 5) -OR 12, 6) -N(R 12) 2, 7) -NR 11 C(=O)R 12, 8) -NR 11 C(=O)OR 12, 9) -NR 11 C(=O)N(R 12) 2, 10) -NR 11 SO 2 R 12, 11) -NR 11 SO 2 N(R 12) 2, 12) -C(=O)R 12, 13) -C(=O)O(C 1 - 6 alkyl), 14) -C(=O)N(R 12) 2, 15) -SO 2 R 12, 16) -SO 2 N(R 12) 2, 17) -aryl, and 18) -heteroaryl; 1) -H, 2) -C 1 - 6 alkyl, 3) -cycloalkyl, 4) -heterocycloalkyl, 5) -OR 12, 6) -N(R 12) 2, 7) -NR 11 C(=O)R 12, 8) -NR 11 C(=O)OR 12, 9) -NR 11 C(=O)N(R 12) 2, 10) -NR 11 SO 2 R 12, 11) -NR 11 SO 2 N(R 12) 2, 12) -C(=O)R 12, 13) -C(=O)O(C 1 - 6 alkyl), 14) -C(=O)N(R 12) 2, 15) -SO 2 R 12, 16) -SO 2 N(R 12) 2, 17) -aryl, and 18) -heteroaryl; R 10 is -H, -C 1 - 6 alkyl, -cycloalkyl, heterocycloalkyl, -C(=O)R 12, -C(=O)OR 12, -C(=O)N(R 12) 2, -SO 2 R 12, -SO 2 N(R 12) 2, aryl, or heteroaryl; each R 11 is independently -H or -C 1 - 6 alkyl; and each R 12 is independently -H, -C 1 - 6 alkyl, -C 1 - 6 alkoxy, -cycloalkyl, heterocycloalkyl, aryl, or heteroaryl; wherein at each occurrence alkyl is substituted with 0, 1, 2, 3, or 4 substituents selected from the group consisting of halo, -oxo, -OH, -CN, -NH 2, -NO 2, -SO 2 (C 1 - 6 alkyl), -C 1 - 6 alkoxy, -cycloalkyl, -heterocycloalkyl, aryl, and heteroaryl; wherein at each occurrence cycloalkyl and heterocycloalkyl are substituted with 0, 1, 2, 3, or 4 substituents selected from the group consisting of halo, -oxo, -OH, -CN, -NH 2, -NO 2, -C 1 - 6 alkyl, -SO 2 (C 1 - 6 alkyl), -CO(C 1 - 6 alkyl), -C 1 - 6 alkoxy, aryl, and heteroaryl; wherein at each occurrence aryl and heteroaryl are substituted with 0, 1, 2, or 3 substituents selected from the group consisting of halo, -OH, -CN, -NH 2, NO 2, -NH(C 1 - 6 alkyl), -N(C 1 - 6 alkyl) 2, -C 1 - 6 alkyl, -cycloalkyl, -heterocycloalkyl, and -C 1 - 6 alkoxy.