x64 implementation