Futher refactoring of assembler loop