A compound represented by the formula: or a pharmaceutically acceptable salt thereof, wherein: ring A is aryl, 9 or 10-membered fused aryl, wherein aryl is fused with a heteroaryl or heterocyclyl group, 6-membered heteroaryl, or 9 or 10-membered fused heteroaryl, wherein the heteroaryl or heterocyclyl groups contain 1-2 N atoms; i or n are independently 0 or 1; m is 1 or 2; k is 0, 1,2, or 3; each R 1 is selected from the group consisting of halo, C 1-6 alkyl, haloC 1-6 alkyl hydroxyl, C 1-6 alkoxyl, and amino, wherein the alkyl group is unsubstituted or substituted by hydroxy, C 1-3 alkoxy, or halo; R 2a and R 2b are independently hydrogen or halo; each R 3 is independently hydrogen, halo, C 1-6 alkyl, or haloC 1-6 alkyl; R 4 is hydrogen, halo, C 1-6 alkyl, or haloC 1-6 alkyl; and R 5 is selected from the group consisting of oxo, -COOH, -NH-C C 1-6 alkyl, -C C 1-6 alkyl, -C 2 C 1-6 alkyl, -C C 1-3 alkyl-heteroaryl, -C C 1-3 alkyl-heterocyclyl, -C heterocyclyl, -C C 3-6 cycloalkyl, -C NH-C 1-6 alkyl, -C NH-C 2-6 alkenyl, -C NH-C 3-6 cycloalkyl, -C NH-heterocyclyl, -C NH-C 1-3 alkyl-C 3-6 cycloalkyl, -C NHC 1-3 alkyl-heterocyclyl, -C NHC 1-3 alkyl-heteroaryl, -SO 2 C 1-6 alkyl, heteroaryl, and CN; wherein the heteroaryl group is a 5- or 6-membered ring, containing 1-4 N, O, or S atoms; wherein the heterocyclyl group is a 3- to 6-membered ring, containing 1-2 N or O atoms; wherein the alkyl group is unsubstituted or substituted by hydroxy, C 1-3 alkoxy, or halo; and wherein the cycloalkyl, heterocyclyl, or heteroaryl groups are unsubstituted or substituted with 1-3 C 1-6 alkyl, halo, hydroxy, hydroxyC 1-6 alkyl, or C 1-6 alkoxyl groups. ring A is aryl, 9 or 10-membered fused aryl, wherein aryl is fused with a heteroaryl or heterocyclyl group, 6-membered heteroaryl, or 9 or 10-membered fused heteroaryl, wherein the heteroaryl or heterocyclyl groups contain 1-2 N atoms; aryl, 9 or 10-membered fused aryl, wherein aryl is fused with a heteroaryl or heterocyclyl group, 6-membered heteroaryl, or 9 or 10-membered fused heteroaryl, i or n are independently 0 or 1; m is 1 or 2; k is 0, 1,2, or 3; each R 1 is selected from the group consisting of halo, C 1-6 alkyl, haloC 1-6 alkyl hydroxyl, C 1-6 alkoxyl, and amino, wherein the alkyl group is unsubstituted or substituted by hydroxy, C 1-3 alkoxy, or halo; halo, C 1-6 alkyl, haloC 1-6 alkyl hydroxyl, C 1-6 alkoxyl, and amino, R 2a and R 2b are independently hydrogen or halo; each R 3 is independently hydrogen, halo, C 1-6 alkyl, or haloC 1-6 alkyl; R 4 is hydrogen, halo, C 1-6 alkyl, or haloC 1-6 alkyl; and R 5 is selected from the group consisting of oxo, -COOH, -NH-C C 1-6 alkyl, -C C 1-6 alkyl, -C 2 C 1-6 alkyl, -C C 1-3 alkyl-heteroaryl, -C C 1-3 alkyl-heterocyclyl, -C heterocyclyl, -C C 3-6 cycloalkyl, -C NH-C 1-6 alkyl, -C NH-C 2-6 alkenyl, -C NH-C 3-6 cycloalkyl, -C NH-heterocyclyl, -C NH-C 1-3 alkyl-C 3-6 cycloalkyl, -C NHC 1-3 alkyl-heterocyclyl, -C NHC 1-3 alkyl-heteroaryl, -SO 2 C 1-6 alkyl, heteroaryl, and CN; wherein the heteroaryl group is a 5- or 6-membered ring, containing 1-4 N, O, or S atoms; wherein the heterocyclyl group is a 3- to 6-membered ring, containing 1-2 N or O atoms; wherein the alkyl group is unsubstituted or substituted by hydroxy, C 1-3 alkoxy, or halo; and wherein the cycloalkyl, heterocyclyl, or heteroaryl groups are unsubstituted or substituted with 1-3 C 1-6 alkyl, halo, hydroxy, hydroxyC 1-6 alkyl, or C 1-6 alkoxyl groups. oxo, -COOH, -NH-C C 1-6 alkyl, -C C 1-6 alkyl, -C 2 C 1-6 alkyl, -C C 1-3 alkyl-heteroaryl, -C C 1-3 alkyl-heterocyclyl, -C heterocyclyl, -C C 3-6 cycloalkyl, -C NH-C 1-6 alkyl, -C NH-C 2-6 alkenyl, -C NH-C 3-6 cycloalkyl, -C NH-heterocyclyl, -C NH-C 1-3 alkyl-C 3-6 cycloalkyl, -C NHC 1-3 alkyl-heterocyclyl, -C NHC 1-3 alkyl-heteroaryl, -SO 2 C 1-6 alkyl, heteroaryl, and CN;