Text this: Software verification for weak memory via program transformation