By prepending .text .thumb .balign 2 to the module-level inline
assembly from a Thumb module, the assembler will generate the assembly
from that module as Thumb, even if the destination module uses an ARM
triple. Similar directives are used for module-level inline assembly in
ARM modules.
The alignment and instruction set are reset based on the target triple
before emitting the first function label.
Suggest outlining this handling in a helper function that takes the original module inline asm string and passes back a new one.