Restored generic (non-SIMD) code