yasm: fix segfaults, optimization, improved