Optimized and reference versions of paeq64