Capstone: A Volatile-Guarded Enum State Machine