yet another inline asm rewrite and fixed old rewrie