rewritten assembly ; faster