The present invention provides for compounds useful for treating an HIV infection, or preventing an HIV infection, or treating AIDS or ARC. The compounds of the invention are of formula I wherein A is A1, A2, A3 or A4 and R1, R2, R3, R4a, R4b, R5, R6, Ar, X1, X2, X4, X4and X5are as herein defined. Also disclosed in the present invention are methods of treating an HIV infection with compounds defined herein and pharmaceutical compositions containing said compounds.本發明提供一種用於治療HIV感染、或預防HIV感染、或治療AIDS或ARC之化合物。本發明之化合物為式I之化合物,其中A為A1、A2、A3或A4,且R1、R2、R3、R4a、R4b、R5、R6、Ar、X1、X2、X3、X4及X5如本文定義。本發明亦揭示一種以本文定義之化合物治療HIV感染之方法及含該化合物之醫藥組合物。