optimized version of Stage 2 macro processor