x86-64 assembly functions for bit/number processing