The assembler procedures are currently generated from text templates. As @klauspost suggested, it would be easier to maintain this quite complex code with avo (https://github.com/mmcloughlin/avo).