VSync: push-button verification and optimization for synchronization primitives on weak memory models