Revert "Use GCC/Clang builtins for bit arithmetics"

This reverts commit 18e97f6dd5457538c7bf39c6abcf346f5a080ca5.
initial import
fixup