#include <perms.h>

                                                                //      1  %begin
#line 1 "regression-bugs-tmp/write-mouses.imp"
int main(int argc, char **argv) {
  __label__ _imp_endofblock;
  _imp_initialise(argc, argv);
                                                                //      2  
                                                                //      3  %routine MOUSES WRITE(%integer n, p)
_imp_current_line = 3; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 3 "regression-bugs-tmp/write-mouses.imp"
void MOUSESWRITE( int N, int P )
#line 3 "regression-bugs-tmp/write-mouses.imp"
{
  __label__ _imp_endofblock;
                                                                //      4  
                                                                //      5  %string(72)%fn ITOS(%integer n, p)
_imp_current_line = 5; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 5 "regression-bugs-tmp/write-mouses.imp"
_imp_string /*%string(72)*/ ITOS( int N, int P )
#line 5 "regression-bugs-tmp/write-mouses.imp"
{
  __label__ _imp_endofblock;
                                                                //      6     %byte %array s(0:72)
_imp_current_line = 6; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 6 "regression-bugs-tmp/write-mouses.imp"
unsigned char S[73];
                                                                //      7     %integer x, sign
_imp_current_line = 7; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 7 "regression-bugs-tmp/write-mouses.imp"
int X;
#line 7 "regression-bugs-tmp/write-mouses.imp"
int SIGN;
                                                                //      8     x = 73
_imp_current_line = 8; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 8 "regression-bugs-tmp/write-mouses.imp"
X = 73;
                                                                //      9     sign = 0
_imp_current_line = 9; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 9 "regression-bugs-tmp/write-mouses.imp"
SIGN = 0;
                                                                //     10     %if p > 0 %start
_imp_current_line = 10; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 10 "regression-bugs-tmp/write-mouses.imp"
if (((P) <= (0))) goto L_0002;
                                                                //     11        sign = ' '
_imp_current_line = 11; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 11 "regression-bugs-tmp/write-mouses.imp"
SIGN = 32;
                                                                //     12        p = 72-p
_imp_current_line = 12; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 12 "regression-bugs-tmp/write-mouses.imp"
P = (((int)(72)) - (P));
                                                                //     13     %else
_imp_current_line = 13; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 13 "regression-bugs-tmp/write-mouses.imp"
goto L_0003;
#line 13 "regression-bugs-tmp/write-mouses.imp"
L_0002:;
                                                                //     14        p = p+73
_imp_current_line = 14; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 14 "regression-bugs-tmp/write-mouses.imp"
P = (((int)(P)) + (73));
                                                                //     15     %finish
_imp_current_line = 15; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 15 "regression-bugs-tmp/write-mouses.imp"
L_0003:;
                                                                //     16     p = 1 %if p <= 0
_imp_current_line = 16; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 16 "regression-bugs-tmp/write-mouses.imp"
if (((P) > (0))) goto L_0004;
#line 16 "regression-bugs-tmp/write-mouses.imp"
P = 1;
#line 16 "regression-bugs-tmp/write-mouses.imp"
L_0004:;
                                                                //     17     %if n < 0 %start
_imp_current_line = 17; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 17 "regression-bugs-tmp/write-mouses.imp"
if (((N) >= (0))) goto L_0005;
                                                                //     18        sign = '-'
_imp_current_line = 18; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 18 "regression-bugs-tmp/write-mouses.imp"
SIGN = 45;
                                                                //     19        n = -n
_imp_current_line = 19; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 19 "regression-bugs-tmp/write-mouses.imp"
N = (-(N));
                                                                //     20        %if n < 0 %start;      !max int
_imp_current_line = 20; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 20 "regression-bugs-tmp/write-mouses.imp"
if (((N) >= (0))) goto L_0006;
                                                                //     21           n = n//(-10)
_imp_current_line = 21; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 21 "regression-bugs-tmp/write-mouses.imp"
N = (long)((long)((int)(N)) / (long)((int)((-10))));
                                                                //     22           x = x-1
_imp_current_line = 22; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 22 "regression-bugs-tmp/write-mouses.imp"
X = (((int)(X)) - (1));
                                                                //     23           s(x) = '8'
_imp_current_line = 23; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 23 "regression-bugs-tmp/write-mouses.imp"
S[X] = 56;
                                                                //     24        %finish
_imp_current_line = 24; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 24 "regression-bugs-tmp/write-mouses.imp"
L_0006:;
                                                                //     25     %finish
_imp_current_line = 25; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 25 "regression-bugs-tmp/write-mouses.imp"
L_0005:;
                                                                //     26     %cycle
_imp_current_line = 26; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 26 "regression-bugs-tmp/write-mouses.imp"
L_0007:;
                                                                //     27        x=x-1
_imp_current_line = 27; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 27 "regression-bugs-tmp/write-mouses.imp"
X = (((int)(X)) - (1));
                                                                //     28        s(x) = rem(n,10)+'0'
_imp_current_line = 28; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 28 "regression-bugs-tmp/write-mouses.imp"
S[X] = (((int)(_imp_REM(N, 10))) + (48));
                                                                //     29        n = n//10
_imp_current_line = 29; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 29 "regression-bugs-tmp/write-mouses.imp"
N = (long)((long)((int)(N)) / (long)((int)(10)));
                                                                //     30     %repeat %until n = 0
_imp_current_line = 30; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 30 "regression-bugs-tmp/write-mouses.imp"
if (((N) == (0))) goto L_0008;
#line 30 "regression-bugs-tmp/write-mouses.imp"
goto L_0007;
#line 30 "regression-bugs-tmp/write-mouses.imp"
L_0008:;
                                                                //     31     %if sign # 0 %start
_imp_current_line = 31; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 31 "regression-bugs-tmp/write-mouses.imp"
if (((SIGN) == (0))) goto L_000a;
                                                                //     32        x = x-1;  s(x) = sign
_imp_current_line = 32; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 32 "regression-bugs-tmp/write-mouses.imp"
X = (((int)(X)) - (1));
_imp_current_line = 32; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 32 "regression-bugs-tmp/write-mouses.imp"
S[X] = SIGN;
                                                                //     33     %finish
_imp_current_line = 33; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 33 "regression-bugs-tmp/write-mouses.imp"
L_000a:;
                                                                //     34     %while x > p %cycle
_imp_current_line = 34; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 34 "regression-bugs-tmp/write-mouses.imp"
L_000b:;
#line 34 "regression-bugs-tmp/write-mouses.imp"
if (((X) <= (P))) goto L_000c;
                                                                //     35        x = x-1;  s(x) = ' '
_imp_current_line = 35; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 35 "regression-bugs-tmp/write-mouses.imp"
X = (((int)(X)) - (1));
_imp_current_line = 35; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 35 "regression-bugs-tmp/write-mouses.imp"
S[X] = 32;
                                                                //     36     %repeat
_imp_current_line = 36; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 36 "regression-bugs-tmp/write-mouses.imp"
goto L_000b;
#line 36 "regression-bugs-tmp/write-mouses.imp"
L_000c:;
                                                                //     37     x = x-1
_imp_current_line = 37; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 37 "regression-bugs-tmp/write-mouses.imp"
X = (((int)(X)) - (1));
                                                                //     38     s(x) = 72-x
_imp_current_line = 38; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 38 "regression-bugs-tmp/write-mouses.imp"
S[X] = (((int)(72)) - (X));
                                                                //     39     %result = string(addr(s(x)))
_imp_current_line = 39; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 39 "regression-bugs-tmp/write-mouses.imp"
return *_imp_STRING(_imp_ADDR(&S[X]));
                                                                //     40  %end
_imp_current_line = 40; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 40 "regression-bugs-tmp/write-mouses.imp"
_imp_endofblock: ;
} // End of block ITOS at level 3
                                                                //     41  
                                                                //     42     printstring(itos(n, p))
_imp_current_line = 42; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 42 "regression-bugs-tmp/write-mouses.imp"
_imp_PRINTSTRING(ITOS(N, P));
                                                                //     43  %end
_imp_current_line = 43; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 43 "regression-bugs-tmp/write-mouses.imp"
return;
_imp_endofblock: ;
} // End of block MOUSESWRITE at level 2
                                                                //     44  
                                                                //     45  %endofprogram
_imp_current_line = 45; _imp_current_file = "regression-bugs-tmp/write-mouses.imp";
#line 45 "regression-bugs-tmp/write-mouses.imp"
return 0;
_imp_endofblock: ;
} // End of block _imp_main at level 1
#line 45 "regression-bugs-tmp/write-mouses.imp"
// End of file
