make use of __uint128_t in scan_ulongn and provide long long based implementation for 32-bit platforms