A few optimizations in assembler code