A compound of formula, or a pharmaceutically acceptable salt thereof: wherein: each of the dotted lines "..." is an optional bond; m is 0, 1, or 2; n is 0, 1, or 2; p is 1 or 2; R a is selected from: hydrogen and C 1-6 alkyl; each occurrence of R b is independently selected from: hydrogen, halogen, and C 1-6 alkyl; R c is selected from: hydrogen, halogen, and C 1-6 alkyl; R 1 and R 2 together with the nitrogen to which they are attached form a saturated or partially saturated 4-6 membered heterocyclyl containing the one nitrogen to which they are attached and zero to two additional hetero atoms independently selected from N, S and O; wherein the heterocyclyl is optionally substituted with one to four substituents independently selected from: (a) halogen, (b) -OH, (c) C 1-6 alkyl, optionally substituted with one to four substituents independently selected from (i) -OH, (ii) halogen and (iii) -C -NHR e, wherein R e is selected from (i) hydrogen and (ii) C 1-6 alkyl, (d) -O-C 1-6 alkyl, optionally substituted with one to four substituents independently selected from (i) -OH and (ii) halogen, (e) -NHR f, wherein R f is selected from (i) hydrogen, (ii) C 1-6 alkyl and (iii) -C -C 1-6 alkyl, and (f) -C -C 1-6 alkyl, optionally substituted with one to four substituents independently selected from (a) -OH and (b) halogen; and R 3 is selected from: aryl, a phenyl fused to a C 4-5 cycloalkyl, C 3-6 cycloalkyl, and heterocyclyl; wherein each of the aryl of and the heterocyclyl of is optionally substituted with one to four substituents independently selected from: (a) halogen, (b) C 1-4 alkyl, optionally substituted with one to three halogens, (c) -O-C 1-4 alkyl, optionally substituted with one to three halogens, (d) -CN, and (e) C 3-6 cycloalkyl, optionally substituted with C 1-4 alkyl. each of the dotted lines "..." is an optional bond; m is 0, 1, or 2; n is 0, 1, or 2; p is 1 or 2; R a is selected from: hydrogen and C 1-6 alkyl; each occurrence of R b is independently selected from: hydrogen, halogen, and C 1-6 alkyl; R c is selected from: hydrogen, halogen, and C 1-6 alkyl; R 1 and R 2 together with the nitrogen to which they are attached form a saturated or partially saturated 4-6 membered heterocyclyl containing the one nitrogen to which they are attached and zero to two additional hetero atoms independently selected from N, S and O; wherein the heterocyclyl is optionally substituted with one to four substituents independently selected from: (a) halogen, (b) -OH, (c) C 1-6 alkyl, optionally substituted with one to four substituents independently selected from (i) -OH, (ii) halogen and (iii) -C -NHR e, wherein R e is selected from (i) hydrogen and (ii) C 1-6 alkyl, (d) -O-C 1-6 alkyl, optionally substituted with one to four substituents independently selected from (i) -OH and (ii) halogen, (e) -NHR f, wherein R f is selected from (i) hydrogen, (ii) C 1-6 alkyl and (iii) -C -C 1-6 alkyl, and (f) -C -C 1-6 alkyl, optionally substituted with one to four substituents independently selected from (a) -OH and (b) halogen; and (a) halogen, (b) -OH, (c) C 1-6 alkyl, optionally substituted with one to four substituents independently selected from (i) -OH, (ii) halogen and (iii) -C -NHR e, wherein R e is selected from (i) hydrogen and (ii) C 1-6 alkyl, (d) -O-C 1-6 alkyl, optionally substituted with one to four substituents independently selected from (i) -OH and (ii) halogen, (e) -NHR f, wherein R f is selected from (i) hydrogen, (ii) C 1-6 alkyl and (iii) -C -C 1-6 alkyl, and (f) -C -C 1-6 alkyl, optionally substituted with one to four substituents independently selected from (a) -OH and (b) halogen; and R 3 is selected from: aryl, a phenyl fused to a C 4-5 cycloalkyl, C 3-6 cycloalkyl, and heterocyclyl; wherein each of the aryl of and the heterocyclyl of is optionally substituted with one to four substituents independently selected from: (a) halogen, (b) C 1-4 alkyl, optionally substituted with one to three halogens, (c) -O-C 1-4 alkyl, optionally substituted with one to three halogens, (d) -CN, and (e) C 3-6 cycloalkyl, optionally substituted with C 1-4 alkyl. aryl, a phenyl fused to a C 4-5 cycloalkyl, C 3-6 cycloalkyl, and heterocyclyl; wherein each of the aryl of and the heterocyclyl of is optionally substituted with one to four substituents independently selected from: (a) halogen, (b) C 1-4 alkyl, optionally substituted with one to three halogens, (c) -O-C 1-4 alkyl, optionally substituted with one to three halogens, (d) -CN, and (e) C 3-6 cycloalkyl, optionally substituted with C 1-4 alkyl. (a) halogen, (b) C 1-4 alkyl, optionally substituted with one to three halogens, (c) -O-C 1-4 alkyl, optionally substituted with one to three halogens, (d) -CN, and (e) C 3-6 cycloalkyl, optionally substituted with C 1-4 alkyl.