move asm code into stmt.cpp

the asm files had grown unwieldly. moving stuff out will make it easier
to work with.