def dump_opcodes(opmap):
op2name = {}<EOL>for k in opmap.keys():<EOL><INDENT>op2name[opmap[k]] = k<EOL><DEDENT>for i in sorted(op2name.keys()):<EOL><INDENT>print("<STR_LIT>" % (str(i), op2name[i]))<EOL><DEDENT>
Utility for dumping opcodes