inline assembly: refactor