A compound of formula: or a pharmaceutically acceptable salt thereof, wherein: R 1 is selected from the group consisting of C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, C 1 -C 6 alkoxy, C 1 -C 6 haloalkyl, C 1 -C 6 haloalkoxy, C 1 -C 6 alkyl-N(R N) 2, phenyl, benzyl, 4 to 8 membered heterocyclyl and 5 to 6 membered heteroaryl; wherein R 1 is bound to the adjacent carbonyl by a carbon atom, and wherein R 1 is optionally substituted by one or two substituents selected from the group consisting of F, Cl, Br, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, C 1 -C 6 alkoxy, C 1 -C 6 haloalkyl, C 1 -C 6 haloalkoxy, C 1 -C 6 alkyl-N(R N) 2, hydroxyl, hydroxymethyl, cyano, cyanomethyl, cyanoethyl, C C 1 -C 6 alkyl, phenyl, benzyl, CH 2 -(C 3 -C 6 cycloalkyl), 5 to 6 membered heteroaryl, and CH 2 -(5 to 6 membered heteroaryl); each R N is independently selected from the group consisting of H, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, C 1 -C 6 alkoxy, and C 1 -C 6 haloalkyl; or two R N may together with the adjacent N form a 4-6 membered ring; and the A ring and the B ring together are selected from the group consisting of: wherein: R 2 is selected from the group consisting of C 1 -C 6 haloalkyl, C 3 -C 6 cycloalkyl, C 1 -C 6 alkoxy, C 1 -C 6 haloalkoxy, C 1 -C 6 thioalkyl, phenyl, benzyl, CH 2 -(C 3 -C 6 cycloalkyl), CH 2 CH 2 -(C 3 -C 6 cycloalkyl), CH 2 -(4 to 6 membered heterocyclyl), CH 2 CH 2 - (4 to 6 membered heterocyclyl), 5 to 6 membered heteroaryl, and CH 2 -(5 to 6 membered heteroaryl); wherein when a phenyl ring is present it may be substituted by 1 to 3 substituents selected from the group consisting of halogen, C 1 -C 4 alkyl, C 1 -C 4 haloalkyl, C 1 -C 4 alkoxy, C 1 -C 4 haloalkoxy, and cyano; and R 3a and R 3b are selected as follows: (i) one of R 3a and R 3b is H, and the other is selected from the group consisting of D, F, Cl, OH, CN, C 1 -C 4 alkyl, C 1 -C 4 haloalkyl, cyclopropyl, C 1 -C 4 alkoxy and C 1 -C 4 haloalkoxy; (ii) each of R 3a and R 3b is selected from the group consisting of D, F, Cl, OH, CN and methyl, provided that R 3a and R 3b cannot both be OH or CN; or (iii) R 3a and R 3b together form cyclopropyl. R 1 is selected from the group consisting of C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, C 1 -C 6 alkoxy, C 1 -C 6 haloalkyl, C 1 -C 6 haloalkoxy, C 1 -C 6 alkyl-N(R N) 2, phenyl, benzyl, 4 to 8 membered heterocyclyl and 5 to 6 membered heteroaryl; wherein R 1 is bound to the adjacent carbonyl by a carbon atom, and wherein R 1 is optionally substituted by one or two substituents selected from the group consisting of F, Cl, Br, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, C 1 -C 6 alkoxy, C 1 -C 6 haloalkyl, C 1 -C 6 haloalkoxy, C 1 -C 6 alkyl-N(R N) 2, hydroxyl, hydroxymethyl, cyano, cyanomethyl, cyanoethyl, C C 1 -C 6 alkyl, phenyl, benzyl, CH 2 -(C 3 -C 6 cycloalkyl), 5 to 6 membered heteroaryl, and CH 2 -(5 to 6 membered heteroaryl); each R N is independently selected from the group consisting of H, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, C 1 -C 6 alkoxy, and C 1 -C 6 haloalkyl; or two R N may together with the adjacent N form a 4-6 membered ring; and the A ring and the B ring together are selected from the group consisting of: wherein: R 2 is selected from the group consisting of C 1 -C 6 haloalkyl, C 3 -C 6 cycloalkyl, C 1 -C 6 alkoxy, C 1 -C 6 haloalkoxy, C 1 -C 6 thioalkyl, phenyl, benzyl, CH 2 -(C 3 -C 6 cycloalkyl), CH 2 CH 2 -(C 3 -C 6 cycloalkyl), CH 2 -(4 to 6 membered heterocyclyl), CH 2 CH 2 - (4 to 6 membered heterocyclyl), 5 to 6 membered heteroaryl, and CH 2 -(5 to 6 membered heteroaryl); wherein when a phenyl ring is present it may be substituted by 1 to 3 substituents selected from the group consisting of halogen, C 1 -C 4 alkyl, C 1 -C 4 haloalkyl, C 1 -C 4 alkoxy, C 1 -C 4 haloalkoxy, and cyano; and R 3a and R 3b are selected as follows: (i) one of R 3a and R 3b is H, and the other is selected from the group consisting of D, F, Cl, OH, CN, C 1 -C 4 alkyl, C 1 -C 4 haloalkyl, cyclopropyl, C 1 -C 4 alkoxy and C 1 -C 4 haloalkoxy; (ii) each of R 3a and R 3b is selected from the group consisting of D, F, Cl, OH, CN and methyl, provided that R 3a and R 3b cannot both be OH or CN; or (iii) R 3a and R 3b together form cyclopropyl. R 2 is selected from the group consisting of C 1 -C 6 haloalkyl, C 3 -C 6 cycloalkyl, C 1 -C 6 alkoxy, C 1 -C 6 haloalkoxy, C 1 -C 6 thioalkyl, phenyl, benzyl, CH 2 -(C 3 -C 6 cycloalkyl), CH 2 CH 2 -(C 3 -C 6 cycloalkyl), CH 2 -(4 to 6 membered heterocyclyl), CH 2 CH 2 - (4 to 6 membered heterocyclyl), 5 to 6 membered heteroaryl, and CH 2 -(5 to 6 membered heteroaryl); wherein when a phenyl ring is present it may be substituted by 1 to 3 substituents selected from the group consisting of halogen, C 1 -C 4 alkyl, C 1 -C 4 haloalkyl, C 1 -C 4 alkoxy, C 1 -C 4 haloalkoxy, and cyano; and R 3a and R 3b are selected as follows: (i) one of R 3a and R 3b is H, and the other is selected from the group consisting of D, F, Cl, OH, CN, C 1 -C 4 alkyl, C 1 -C 4 haloalkyl, cyclopropyl, C 1 -C 4 alkoxy and C 1 -C 4 haloalkoxy; (ii) each of R 3a and R 3b is selected from the group consisting of D, F, Cl, OH, CN and methyl, provided that R 3a and R 3b cannot both be OH or CN; or (iii) R 3a and R 3b together form cyclopropyl. (i) one of R 3a and R 3b is H, and the other is selected from the group consisting of D, F, Cl, OH, CN, C 1 -C 4 alkyl, C 1 -C 4 haloalkyl, cyclopropyl, C 1 -C 4 alkoxy and C 1 -C 4 haloalkoxy; (ii) each of R 3a and R 3b is selected from the group consisting of D, F, Cl, OH, CN and methyl, provided that R 3a and R 3b cannot both be OH or CN; or (iii) R 3a and R 3b together form cyclopropyl.