I'm sure the problem has something to do with the overhead of calling and running a function, but not specifically sure.
However, by reimplementing the ReadBits function as a #define macro the problem is fixed, and the code is just as easy to use. It looks like this:
#define ReadBits(REG, MASK) (((REG) & (MASK)) >> __builtin_ctz(MASK))