in reply to Perl's regex engine causes me distress

Another possible optimization:
m{ A (?: [^AB]+ | .B )* [^AB]* A }x;


$_="goto+F.print+chop;\n=yhpaj";F1:eval