A compound of formula: wherein R 1 is selected from C 1-6 alkyl, phenyl, and C 3-6 cycloalkyl, wherein C 1-6 alkyl is optionally substituted with -OR q, wherein R q is hydrogen or C 1-3 alkyl; R 2 is selected from hydrogen and C 1-6 alkyl; R 3 is selected from hydrogen, C 1-6 alkyl, -C OC 1-6 alkyl, -C NR a R b, -C C 3-6 cycloalkyl, and -S 2 C 1-3 alkyl; wherein R a and R b are independently hydrogen or C 1-6 alkyl; R 5 is selected from C 1-6 alkyl, C 3-6 cycloalkyl, C 1-6 alkoxy, -C(R k R d)NR e R f, -NR g R h, heteroaryl, heterocycle, and -CH 2 -heteroaryl; wherein: any heteroaryl or heterocycle has 5 or 6 ring atoms; C 1-6 alkyl is optionally substituted with one or two substituents independently selected from -OR c, -NHC C 1-3 alkyl, and -NHC OC 1-3 alkyl; C 1-6 alkoxy is optionally substituted with -OR d; C 3-6 cycloalkyl is optionally substituted with one or two substituents independently selected from C 1-3 alkyl and halo; any heterocycle is optionally substituted with one, two, or three substituents independently selected from C 1-3 alkyl, halo, -C OC 1-3 alkyl, -C C 1-6 alkyl, -C C 3-6 cycloalkyl, -C NHC 1-6 alkyl, and -C NHC 3-6 cycloalkyl; wherein any -C C 1-6 alkyl is optionally substituted with -NHC OC 1-3 alkyl, -OR n, -NR d R e, or heterocycle, any -C C 3-6 cycloalkyl is optionally substituted with one or two C 1-3 alkyl, and any -C NHC 1-6 alkyl is optionally substituted with -OR n or C 3-6 cycloalkyl; any heteroaryl is optionally substituted with C 1-3 alkyl; R c is independently selected from hydrogen, C 1-6 alkyl, and phenyl; R k, R d, R e, R g, and R h are each independently hydrogen or C 1-3 alkyl; R f is selected from hydrogen and -C C 1-3 alkyl; R n is independently hydrogen or C 1-3 alkyl; R 7 is selected from halo, C 1-6 alkyl, and C 1-6 alkoxy wherein C 1-6 alkyl and C 1-6 alkoxy are optionally substituted with one, two, or three halo; and R 9 is C 1-3 alkyl; a is 1 or 2; and c is 1 or 2; or a pharmaceutically-acceptable salt or stereoisomer thereof. R 1 is selected from C 1-6 alkyl, phenyl, and C 3-6 cycloalkyl, wherein C 1-6 alkyl is optionally substituted with -OR q, wherein R q is hydrogen or C 1-3 alkyl; R 2 is selected from hydrogen and C 1-6 alkyl; R 3 is selected from hydrogen, C 1-6 alkyl, -C OC 1-6 alkyl, -C NR a R b, -C C 3-6 cycloalkyl, and -S 2 C 1-3 alkyl; wherein R a and R b are independently hydrogen or C 1-6 alkyl; R 5 is selected from C 1-6 alkyl, C 3-6 cycloalkyl, C 1-6 alkoxy, -C(R k R d)NR e R f, -NR g R h, heteroaryl, heterocycle, and -CH 2 -heteroaryl; wherein: any heteroaryl or heterocycle has 5 or 6 ring atoms; C 1-6 alkyl is optionally substituted with one or two substituents independently selected from -OR c, -NHC C 1-3 alkyl, and -NHC OC 1-3 alkyl; C 1-6 alkoxy is optionally substituted with -OR d; C 3-6 cycloalkyl is optionally substituted with one or two substituents independently selected from C 1-3 alkyl and halo; any heterocycle is optionally substituted with one, two, or three substituents independently selected from C 1-3 alkyl, halo, -C OC 1-3 alkyl, -C C 1-6 alkyl, -C C 3-6 cycloalkyl, -C NHC 1-6 alkyl, and -C NHC 3-6 cycloalkyl; wherein any -C C 1-6 alkyl is optionally substituted with -NHC OC 1-3 alkyl, -OR n, -NR d R e, or heterocycle, any -C C 3-6 cycloalkyl is optionally substituted with one or two C 1-3 alkyl, and any -C NHC 1-6 alkyl is optionally substituted with -OR n or C 3-6 cycloalkyl; any heteroaryl is optionally substituted with C 1-3 alkyl; R c is independently selected from hydrogen, C 1-6 alkyl, and phenyl; R k, R d, R e, R g, and R h are each independently hydrogen or C 1-3 alkyl; R f is selected from hydrogen and -C C 1-3 alkyl; R n is independently hydrogen or C 1-3 alkyl; any heteroaryl or heterocycle has 5 or 6 ring atoms; C 1-6 alkyl is optionally substituted with one or two substituents independently selected from -OR c, -NHC C 1-3 alkyl, and -NHC OC 1-3 alkyl; C 1-6 alkoxy is optionally substituted with -OR d; C 3-6 cycloalkyl is optionally substituted with one or two substituents independently selected from C 1-3 alkyl and halo; any heterocycle is optionally substituted with one, two, or three substituents independently selected from C 1-3 alkyl, halo, -C OC 1-3 alkyl, -C C 1-6 alkyl, -C C 3-6 cycloalkyl, -C NHC 1-6 alkyl, and -C NHC 3-6 cycloalkyl; wherein any -C C 1-6 alkyl is optionally substituted with -NHC OC 1-3 alkyl, -OR n, -NR d R e, or heterocycle, any -C C 3-6 cycloalkyl is optionally substituted with one or two C 1-3 alkyl, and any -C NHC 1-6 alkyl is optionally substituted with -OR n or C 3-6 cycloalkyl; any heteroaryl is optionally substituted with C 1-3 alkyl; R c is independently selected from hydrogen, C 1-6 alkyl, and phenyl; R k, R d, R e, R g, and R h are each independently hydrogen or C 1-3 alkyl; R f is selected from hydrogen and -C C 1-3 alkyl; R n is independently hydrogen or C 1-3 alkyl; R 7 is selected from halo, C 1-6 alkyl, and C 1-6 alkoxy wherein C 1-6 alkyl and C 1-6 alkoxy are optionally substituted with one, two, or three halo; and R 9 is C 1-3 alkyl; a is 1 or 2; and c is 1 or 2;