88 {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15},
89 {2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8},
90 {3, 4, 10, 12, 13, 2, 7, 14, 6, 5, 9, 0, 11, 15, 8, 1},
91 {10, 7, 12, 9, 14, 3, 13, 15, 4, 0, 11, 2, 5, 8, 1, 6},
92 {12, 13, 9, 11, 15, 10, 14, 8, 7, 2, 5, 3, 0, 1, 6, 4},
93 {9, 14, 11, 5, 8, 12, 15, 1, 13, 3, 0, 10, 2, 6, 4, 7},
94 {11, 15, 5, 0, 1, 9, 8, 6, 14, 10, 2, 12, 3, 4, 7, 13},
100#if defined(__GNUC__) || defined(__clang__)
101 return 63 ^ (
unsigned int)__builtin_clzll(x);
102#elif defined(_MSC_VER) && defined(IS_X86_64)
104 _BitScanReverse64(&index, x);
106#elif defined(_MSC_VER) && defined(IS_X86_32)
109 _BitScanReverse(&index, (
unsigned long)(x >> 32));
113 _BitScanReverse(&index, (
unsigned long)x);
118 if(x & 0xffffffff00000000ULL) { x >>= 32; c += 32; }
119 if(x & 0x00000000ffff0000ULL) { x >>= 16; c += 16; }
120 if(x & 0x000000000000ff00ULL) { x >>= 8; c += 8; }
121 if(x & 0x00000000000000f0ULL) { x >>= 4; c += 4; }
122 if(x & 0x000000000000000cULL) { x >>= 2; c += 2; }
123 if(x & 0x0000000000000002ULL) { c += 1; }
188 store32(&bytes_out[0 * 4], cv_words[0]);
189 store32(&bytes_out[1 * 4], cv_words[1]);
190 store32(&bytes_out[2 * 4], cv_words[2]);
191 store32(&bytes_out[3 * 4], cv_words[3]);
192 store32(&bytes_out[4 * 4], cv_words[4]);
193 store32(&bytes_out[5 * 4], cv_words[5]);
194 store32(&bytes_out[6 * 4], cv_words[6]);
195 store32(&bytes_out[7 * 4], cv_words[7]);