The present invention relates to Spirocyclic Heterocycle Compounds of Formula (I): (I) and pharmaceutically acceptable salts thereof, wherein A, B, X, R1, R2, R3 and R4 are as defined herein. The present invention also relates to compositions comprising at least one Spirocyclic Heterocycle Compound, and methods of using the Spirocyclic Heterocycle Compounds for treating or preventing HIV infection in a subject.