hash: replace libc memcmp with optimized functions for arm64