refactor asm module parsing code into separate file