asm-based sort fix