#include <perms.h>

                                                                //      1  %const %string (1) SNL ="
#line 1 "regression-compile-tmp/compare.imp"
const _imp_string /*%string(1)*/ SNL = _imp_str_literal("\n");
                                                                //      2  "
                                                                //      3  %begin
#line 3 "regression-compile-tmp/compare.imp"
int main(int argc, char **argv) {
  _imp_initialise(argc, argv);
                                                                //      4     %const %integer TRUE = 1, FALSE = 0
                                                                //      5     %constant %integer  A stream = 1, B stream = 2
                                                                //      6     %ownstring (255) A file, B file, pr, left, right
#line 6 "regression-compile-tmp/compare.imp"
static _imp_string /*%string(255)*/ AFILE;
#line 6 "regression-compile-tmp/compare.imp"
static _imp_string /*%string(255)*/ BFILE;
#line 6 "regression-compile-tmp/compare.imp"
static _imp_string /*%string(255)*/ PR;
#line 6 "regression-compile-tmp/compare.imp"
static _imp_string /*%string(255)*/ LEFT;
#line 6 "regression-compile-tmp/compare.imp"
static _imp_string /*%string(255)*/ RIGHT;
                                                                //      7     %ownstring (255) %array File('A':'B')
#line 7 "regression-compile-tmp/compare.imp"
static _imp_string /*%string(255)*/ FILE[2];
                                                                //      8     %owninteger %array Base('A':'B')
#line 8 "regression-compile-tmp/compare.imp"
static int BASE[2];
                                                                //      9     %owninteger A count, B count
#line 9 "regression-compile-tmp/compare.imp"
static int ACOUNT;
#line 9 "regression-compile-tmp/compare.imp"
static int BCOUNT;
                                                                //     10     %owninteger A num, B num
#line 10 "regression-compile-tmp/compare.imp"
static int ANUM;
#line 10 "regression-compile-tmp/compare.imp"
static int BNUM;
                                                                //     11  
                                                                //     12     %const %integer Max Lines = 512, Max Line Width = 128
                                                                //     13     %byte %integer %array AA, BB (1:Max Lines*Max Line Width)
#line 13 "regression-compile-tmp/compare.imp"
unsigned char AA[(((unsigned char)((((int)((((int)(512)) * (128)))) - (1)))) + (1))];
#line 13 "regression-compile-tmp/compare.imp"
unsigned char BB[(((unsigned char)((((int)((((int)(512)) * (128)))) - (1)))) + (1))];
                                                                //     14  
                                                                //     15     %integer%fn  input ended
#line 15 "regression-compile-tmp/compare.imp"
int INPUTENDED( void )
#line 15 "regression-compile-tmp/compare.imp"
{
                                                                //     16        %integer ch
#line 16 "regression-compile-tmp/compare.imp"
int CH;
                                                                //     17        %on %event 9 %start
#line 17 "regression-compile-tmp/compare.imp"
if (!_imp_on_event(9)) goto L_0002;  /* TO DO: Remove %on %event handler just before L_0002: if present for this block */
                                                                //     18           %result = TRUE
#line 18 "regression-compile-tmp/compare.imp"
/* Remove %on %event handler here if present for this block */
return 1;
                                                                //     19        %finish
#line 19 "regression-compile-tmp/compare.imp"
L_0002:;
                                                                //     20        ch = next symbol
#line 20 "regression-compile-tmp/compare.imp"
CH = _imp_NEXTSYMBOL();
                                                                //     21        %result = FALSE
#line 21 "regression-compile-tmp/compare.imp"
/* Remove %on %event handler here if present for this block */
return 0;
                                                                //     22     %end
#line 22 "regression-compile-tmp/compare.imp"
} // End of block INPUTENDED at level 2
                                                                //     23  
                                                                //     24     %routine  Rd line (%string (*) %name s)
#line 24 "regression-compile-tmp/compare.imp"
void RDLINE( _imp_string /*%string(255)*/ /*name*/*S )
#line 24 "regression-compile-tmp/compare.imp"
{
                                                                //     25        %integer ch
#line 25 "regression-compile-tmp/compare.imp"
int CH;
                                                                //     26        s = ""
#line 26 "regression-compile-tmp/compare.imp"
*S = _imp_str_literal("");
                                                                //     27        %cycle
#line 27 "regression-compile-tmp/compare.imp"
L_0003:;
                                                                //     28           read symbol (ch)
#line 28 "regression-compile-tmp/compare.imp"
_imp_READSYMBOL(&CH);
                                                                //     29           %exit %if ch = nl %or LENGTH(s) = Max Line Width
#line 29 "regression-compile-tmp/compare.imp"
if (((CH) == (10))) goto L_0006;
#line 29 "regression-compile-tmp/compare.imp"
if (((*_imp_LENGTH(S)) != (128))) goto L_0007;
#line 29 "regression-compile-tmp/compare.imp"
L_0006:;
#line 29 "regression-compile-tmp/compare.imp"
goto L_0004;
#line 29 "regression-compile-tmp/compare.imp"
L_0007:;
                                                                //     30           s = s.tostring(ch)
#line 30 "regression-compile-tmp/compare.imp"
*S = _imp_join((_imp_string)*S,(_imp_string)_imp_TOSTRING(CH));
                                                                //     31        %repeat
#line 31 "regression-compile-tmp/compare.imp"
goto L_0003;
#line 31 "regression-compile-tmp/compare.imp"
L_0004:;
                                                                //     32     %end
#line 32 "regression-compile-tmp/compare.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block RDLINE at level 2
                                                                //     33  
                                                                //     34     %byte %integer %map  A (%integer i, j)
#line 34 "regression-compile-tmp/compare.imp"
unsigned char /*map*/*A( int I, int J )
#line 34 "regression-compile-tmp/compare.imp"
{
                                                                //     35        %result == AA (((Base('A') + i)&(Max Lines-1))*Max Line Width + j)
#line 35 "regression-compile-tmp/compare.imp"
/* Remove %on %event handler here if present for this block */
return &AA[(((int)((((int)((((int)((((((int)((BASE-65)[65])) + (I))) & (511)))) * (128)))) + (J)))) - (1))];
                                                                //     36     %end
#line 36 "regression-compile-tmp/compare.imp"
} // End of block A at level 2
                                                                //     37  
                                                                //     38     %byte %integer %map  B (%integer i, j)
#line 38 "regression-compile-tmp/compare.imp"
unsigned char /*map*/*B( int I, int J )
#line 38 "regression-compile-tmp/compare.imp"
{
                                                                //     39        %result == BB (((Base('B') + i)&(Max Lines-1))*Max Line Width + j)
#line 39 "regression-compile-tmp/compare.imp"
/* Remove %on %event handler here if present for this block */
return &BB[(((int)((((int)((((int)((((((int)((BASE-65)[66])) + (I))) & (511)))) * (128)))) + (J)))) - (1))];
                                                                //     40     %end
#line 40 "regression-compile-tmp/compare.imp"
} // End of block B at level 2
/* Procedure parameter. probably no args given yet. */                                                                //     41  
                                                                //     42     %routine  refill (%byte %integer %map x (%integer i, j),
#line 42 "regression-compile-tmp/compare.imp"
void REFILL( unsigned char /*map*/*X( 