Write a C function to reverse the bits of an unsigned 32-bit integer, and explain how you would optimize it for an embedded processor.