{
        const UInt8* p = reinterpret_cast<const UInt8*>(mem_ptr);
        return static_cast<UInt16>(p[0]) + (p[1] << 8);
}
namespace LZ4
{
namespace
{
template <size_t N> [[maybe_unused]] void copy(UInt8 * dst, const UInt8 * src);
template <size_t N> [[maybe_unused]] void wildCopy(UInt8 * dst, const UInt8 * src, UInt8 * dst_end);
template <size_t N, bool USE_SHUFFLE> [[maybe_unused]] void copyOverlap(UInt8 * op, const UInt8 *& match, size_t offset);
inline void copy8(UInt8 * dst, const UInt8 * src)
{
    memcpy(dst, src, 8);
}
inline void wildCopy8(UInt8 * dst, const UInt8 * src, const UInt8 * dst_end)
{
    
#if defined(__clang__)
    #pragma nounroll
#endif
    do
    {
        copy8(dst, src);
        dst += 8;
        src += 8;
    } while (dst < dst_end);
}
inline void copyOverlap8(UInt8 * op, const UInt8 *& match, size_t offset)