INT8 __stdcall RtlFindMostSignificantBit(UINT64 Set){ bool v1; __int64 v2; INT8 result; v1 = !_BitScanReverse64((unsigned __int64 *)&v2, Set); result = -1; if( !v1 ) return v2; return result; }