#include <perms.h>

                                                                //      1  %systemstring(127)%fn itos(%integer v,p)
#line 1 "regression-bugs-tmp/itos.imp"
extern _imp_string /*%string(127)*/ itos( int V, int P )
#line 1 "regression-bugs-tmp/itos.imp"
{
  __label__ _imp_endofblock;
                                                                //      2  %string(127)store
_imp_current_line = 2; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 2 "regression-bugs-tmp/itos.imp"
_imp_string /*%string(127)*/ STORE;
                                                                //      3  %bytename l
_imp_current_line = 3; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 3 "regression-bugs-tmp/itos.imp"
unsigned char /*name*/*L;
                                                                //      4    %routine printsymbol(%integer x)
_imp_current_line = 4; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 4 "regression-bugs-tmp/itos.imp"
void PRINTSYMBOL( int X )
#line 4 "regression-bugs-tmp/itos.imp"
{
  __label__ _imp_endofblock;
                                                                //      5      l = l+1; charno(store,l) = x
_imp_current_line = 5; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 5 "regression-bugs-tmp/itos.imp"
*L = ((*(int *)(L)) + (1));
_imp_current_line = 5; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 5 "regression-bugs-tmp/itos.imp"
*_imp_CHARNO(&STORE, *L) = X;
                                                                //      6    %end
_imp_current_line = 6; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 6 "regression-bugs-tmp/itos.imp"
return;
_imp_endofblock: ;
} // End of block PRINTSYMBOL at level 2
                                                                //      7    %routine spaces(%integer x)
_imp_current_line = 7; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 7 "regression-bugs-tmp/itos.imp"
void SPACES( int X )
#line 7 "regression-bugs-tmp/itos.imp"
{
  __label__ _imp_endofblock;
                                                                //      8      x = x-1 %and printsymbol(' ') %while x>0
_imp_current_line = 8; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 8 "regression-bugs-tmp/itos.imp"
L_0002:;
#line 8 "regression-bugs-tmp/itos.imp"
if (((X) <= (0))) goto L_0003;
#line 8 "regression-bugs-tmp/itos.imp"
X = (((int)(X)) - (1));
#line 8 "regression-bugs-tmp/itos.imp"
PRINTSYMBOL(32);
#line 8 "regression-bugs-tmp/itos.imp"
goto L_0002;
#line 8 "regression-bugs-tmp/itos.imp"
L_0003:;
                                                                //      9    %end
_imp_current_line = 9; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 9 "regression-bugs-tmp/itos.imp"
return;
_imp_endofblock: ;
} // End of block SPACES at level 2
                                                                //     10    %routine write(%integer n,p)
_imp_current_line = 10; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 10 "regression-bugs-tmp/itos.imp"
void WRITE( int N, int P )
#line 10 "regression-bugs-tmp/itos.imp"
{
  __label__ _imp_endofblock;
                                                                //     11    %integer q,r
_imp_current_line = 11; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 11 "regression-bugs-tmp/itos.imp"
int Q;
#line 11 "regression-bugs-tmp/itos.imp"
int R;
                                                                //     12      %if p>0 %start
_imp_current_line = 12; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 12 "regression-bugs-tmp/itos.imp"
if (((P) <= (0))) goto L_0005;
                                                                //     13        p = \p; printsymbol(' ') %and p = p+1 %if n>=0
_imp_current_line = 13; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 13 "regression-bugs-tmp/itos.imp"
P = (~(P));
_imp_current_line = 13; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 13 "regression-bugs-tmp/itos.imp"
if (((N) < (0))) goto L_0006;
#line 13 "regression-bugs-tmp/itos.imp"
PRINTSYMBOL(32);
#line 13 "regression-bugs-tmp/itos.imp"
P = (((int)(P)) + (1));
#line 13 "regression-bugs-tmp/itos.imp"
L_0006:;
                                                                //     14      %finish
_imp_current_line = 14; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 14 "regression-bugs-tmp/itos.imp"
L_0005:;
                                                                //     15      p = -120 %if p<-120
_imp_current_line = 15; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 15 "regression-bugs-tmp/itos.imp"
if (((P) >= ((-120)))) goto L_0007;
#line 15 "regression-bugs-tmp/itos.imp"
P = (-120);
#line 15 "regression-bugs-tmp/itos.imp"
L_0007:;
                                                                //     16      q = n//10; *move.l d1,r
_imp_current_line = 16; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 16 "regression-bugs-tmp/itos.imp"
Q = (long)((long)((int)(N)) / (long)((int)(10)));
_imp_current_line = 16; _imp_current_file = "regression-bugs-tmp/itos.imp";
                                                                //     17      %if q=0 %start
_imp_current_line = 17; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 17 "regression-bugs-tmp/itos.imp"
if (((Q) != (0))) goto L_0008;
                                                                //     18        p = p+1 %if n<0; spaces(-1-p); printsymbol('-') %if n<0
_imp_current_line = 18; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 18 "regression-bugs-tmp/itos.imp"
if (((N) >= (0))) goto L_0009;
#line 18 "regression-bugs-tmp/itos.imp"
P = (((int)(P)) + (1));
#line 18 "regression-bugs-tmp/itos.imp"
L_0009:;
_imp_current_line = 18; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 18 "regression-bugs-tmp/itos.imp"
SPACES((((int)((-1))) - (P)));
_imp_current_line = 18; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 18 "regression-bugs-tmp/itos.imp"
if (((N) >= (0))) goto L_000a;
#line 18 "regression-bugs-tmp/itos.imp"
PRINTSYMBOL(45);
#line 18 "regression-bugs-tmp/itos.imp"
L_000a:;
                                                                //     19      %else
_imp_current_line = 19; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 19 "regression-bugs-tmp/itos.imp"
goto L_000b;
#line 19 "regression-bugs-tmp/itos.imp"
L_0008:;
                                                                //     20        p = p+1 %if p<0; write(q,p)
_imp_current_line = 20; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 20 "regression-bugs-tmp/itos.imp"
if (((P) >= (0))) goto L_000c;
#line 20 "regression-bugs-tmp/itos.imp"
P = (((int)(P)) + (1));
#line 20 "regression-bugs-tmp/itos.imp"
L_000c:;
_imp_current_line = 20; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 20 "regression-bugs-tmp/itos.imp"
WRITE(Q, P);
                                                                //     21      %finish
_imp_current_line = 21; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 21 "regression-bugs-tmp/itos.imp"
L_000b:;
                                                                //     22      printsymbol(|r|+'0')
_imp_current_line = 22; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 22 "regression-bugs-tmp/itos.imp"
PRINTSYMBOL(((_imp_IMOD(R)) + (48)));
                                                                //     23    %end
_imp_current_line = 23; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 23 "regression-bugs-tmp/itos.imp"
return;
_imp_endofblock: ;
} // End of block WRITE at level 2
                                                                //     24    store = ""; l == length(store)
_imp_current_line = 24; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 24 "regression-bugs-tmp/itos.imp"
STORE = _imp_str_literal("");
_imp_current_line = 24; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 24 "regression-bugs-tmp/itos.imp"
L = _imp_LENGTH(&STORE);
                                                                //     25    write(v,p)
_imp_current_line = 25; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 25 "regression-bugs-tmp/itos.imp"
WRITE(V, P);
                                                                //     26    %result = store
_imp_current_line = 26; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 26 "regression-bugs-tmp/itos.imp"
return STORE;
                                                                //     27  %end
_imp_current_line = 27; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 27 "regression-bugs-tmp/itos.imp"
_imp_endofblock: ;
} // End of block itos at level 1
                                                                //     28  
                                                                //     29  %begin
#line 29 "regression-bugs-tmp/itos.imp"
int main(int argc, char **argv) {
  __label__ _imp_endofblock;
  _imp_initialise(argc, argv);
                                                                //     30  %end
_imp_current_line = 30; _imp_current_file = "regression-bugs-tmp/itos.imp";
#line 30 "regression-bugs-tmp/itos.imp"
return 0;
_imp_endofblock: ;
} // End of block _imp_main at level 1
                                                                //     31  
                                                                //     32  %endoffile
#line 32 "regression-bugs-tmp/itos.imp"
// End of file
