consolidate asm() statements to appease IAR 5.5x

IAR 5.50 introduced the restriction that instructions in one asm() block could
not refer to labels in another; this patch stops such unhygienic references by
simply merging many asm() statements into a single block (in several places in
the code).