| 682 | return (shift==0 ? x : ((x << shift) | (x >> (MI_INTPTR_BITS - shift)))); |
| 683 | } |
| 684 | static inline uintptr_t mi_rotr(uintptr_t x, uintptr_t shift) { |
| 685 | shift %= MI_INTPTR_BITS; |
| 686 | return (shift==0 ? x : ((x >> shift) | (x << (MI_INTPTR_BITS - shift)))); |
| 687 | } |
| 688 | |
| 689 | static inline void* mi_ptr_decode(const void* null, const mi_encoded_t x, const uintptr_t* keys) { |
| 690 | void* p = (void*)(mi_rotr(x - keys[0], keys[0]) ^ keys[1]); |