Structurising control flow via functionalisation in problems of decompilation