use core::arch::x86_64::{
_mm_clmulepi64_si128, _mm_cvtsi128_si64, _mm_set_epi64x, _mm_unpackhi_epi64,
};
const LOW_BY_LOW: i32 = 0x00;
#[inline]
pub(super) fn clmul_64x64(a: u64, b: u64) -> u128 {
unsafe {
let a = _mm_set_epi64x(0, a as i64);
let b = _mm_set_epi64x(0, b as i64);
let product = _mm_clmulepi64_si128::<LOW_BY_LOW>(a, b);
let low = _mm_cvtsi128_si64(product) as u64;
let high = _mm_cvtsi128_si64(_mm_unpackhi_epi64(product, product)) as u64;
u128::from(low) | (u128::from(high) << 64)
}
}