abstract the str/ldr instructions and fix the format issues