#import math
#import cond
#Setup initial conditions
M\{([\[\]+\-.r<>]+)(!(.*?))?\}/\n\n\n\n$1\n$3\n/
#If the current memory is blank, unblank it.
^([\d ]*)\n([\d ]*)\n\n/$1\n$2\n127\n/
#If the program's terminated, dump it to output.
^[\d ]*\n[\d ]*\n\d*\n[\[\]+\-.r<>]*\n\n.*\n([\d ]*)$/$1/
#LOOPING STUFF
MATCH_LEFT\{([\[\]+\-.r<>]*)\}\{(\])([\[\]+\-.r<>]*)\}\{\}/$1$2\n$3/
MATCH_LEFT\{([\[\]+\-.r<>]*)\}\{(\[)([\[\]+\-.r<>]*)\}\{(_*)\}/MATCH_LEFT{$1$2}{$3}{$4_}/
MATCH_LEFT\{([\[\]+\-.r<>]*)\}\{(\])([\[\]+\-.r<>]*)\}\{(_*)_\}/MATCH_LEFT{$1$2}{$3}{$4}/