#include <perms.h>

                                                                //      1  %begin
#line 1 "regression-bugs-tmp/mouses-print.imp"
int main(int argc, char **argv) {
  _imp_initialise(argc, argv);
                                                                //      2  
                                                                //      3  %routine mouseswrite(%integer n, p)
#line 3 "regression-bugs-tmp/mouses-print.imp"
void MOUSESWRITE( int N, int P )
#line 3 "regression-bugs-tmp/mouses-print.imp"
{
                                                                //      4     %string (72) %fn itos(%integer n, p)
#line 4 "regression-bugs-tmp/mouses-print.imp"
_imp_string /*%string(72)*/ ITOS( int N, int P )
#line 4 "regression-bugs-tmp/mouses-print.imp"
{
                                                                //      5        %byte %array s(0 : 72)
#line 5 "regression-bugs-tmp/mouses-print.imp"
unsigned char S[73];
                                                                //      6        %integer x, sign
#line 6 "regression-bugs-tmp/mouses-print.imp"
int X;
#line 6 "regression-bugs-tmp/mouses-print.imp"
int SIGN;
                                                                //      7        x = 73
#line 7 "regression-bugs-tmp/mouses-print.imp"
X = 73;
                                                                //      8        sign = 0
#line 8 "regression-bugs-tmp/mouses-print.imp"
SIGN = 0;
                                                                //      9        %if p > 0 %start
#line 9 "regression-bugs-tmp/mouses-print.imp"
if (((P) <= (0))) goto L_0002;
                                                                //     10           sign = ' '
#line 10 "regression-bugs-tmp/mouses-print.imp"
SIGN = 32;
                                                                //     11           p = 72 - p
#line 11 "regression-bugs-tmp/mouses-print.imp"
P = (((int)(72)) - (P));
                                                                //     12        %else
#line 12 "regression-bugs-tmp/mouses-print.imp"
goto L_0003;
#line 12 "regression-bugs-tmp/mouses-print.imp"
L_0002:;
                                                                //     13           p = p + 73
#line 13 "regression-bugs-tmp/mouses-print.imp"
P = (((int)(P)) + (73));
                                                                //     14        %finish
#line 14 "regression-bugs-tmp/mouses-print.imp"
L_0003:;
                                                                //     15        p = 1 %if p <= 0
#line 15 "regression-bugs-tmp/mouses-print.imp"
if (((P) > (0))) goto L_0004;
#line 15 "regression-bugs-tmp/mouses-print.imp"
P = 1;
#line 15 "regression-bugs-tmp/mouses-print.imp"
L_0004:;
                                                                //     16        %if n < 0 %start
#line 16 "regression-bugs-tmp/mouses-print.imp"
if (((N) >= (0))) goto L_0005;
                                                                //     17           sign = '-'
#line 17 "regression-bugs-tmp/mouses-print.imp"
SIGN = 45;
                                                                //     18           n = -n
#line 18 "regression-bugs-tmp/mouses-print.imp"
N = (-(N));
                                                                //     19           %if n < 0 %start
#line 19 "regression-bugs-tmp/mouses-print.imp"
if (((N) >= (0))) goto L_0006;
                                                                //     20              !max int
                                                                //     21              n = n // (-10)
#line 21 "regression-bugs-tmp/mouses-print.imp"
N = (long)((long)((int)(N)) / (long)((int)((-10))));
                                                                //     22              x = x - 1
#line 22 "regression-bugs-tmp/mouses-print.imp"
X = (((int)(X)) - (1));
                                                                //     23              s(x) = '8'
#line 23 "regression-bugs-tmp/mouses-print.imp"
S[X] = 56;
                                                                //     24           %finish
#line 24 "regression-bugs-tmp/mouses-print.imp"
L_0006:;
                                                                //     25        %finish
#line 25 "regression-bugs-tmp/mouses-print.imp"
L_0005:;
                                                                //     26        %cycle 
#line 26 "regression-bugs-tmp/mouses-print.imp"
L_0007:;
                                                                //     27           x = x - 1
#line 27 "regression-bugs-tmp/mouses-print.imp"
X = (((int)(X)) - (1));
                                                                //     28           s(x) = rem(n, 10) + '0'
#line 28 "regression-bugs-tmp/mouses-print.imp"
S[X] = (((int)(_imp_REM(N, 10))) + (48));
                                                                //     29           n = n // 10
#line 29 "regression-bugs-tmp/mouses-print.imp"
N = (long)((long)((int)(N)) / (long)((int)(10)));
                                                                //     30        %repeat %until n = 0
#line 30 "regression-bugs-tmp/mouses-print.imp"
if (((N) == (0))) goto L_0008;
#line 30 "regression-bugs-tmp/mouses-print.imp"
goto L_0007;
#line 30 "regression-bugs-tmp/mouses-print.imp"
L_0008:;
                                                                //     31        %if sign # 0 %start
#line 31 "regression-bugs-tmp/mouses-print.imp"
if (((SIGN) == (0))) goto L_000a;
                                                                //     32           x = x - 1
#line 32 "regression-bugs-tmp/mouses-print.imp"
X = (((int)(X)) - (1));
                                                                //     33           s(x) = sign
#line 33 "regression-bugs-tmp/mouses-print.imp"
S[X] = SIGN;
                                                                //     34        %finish
#line 34 "regression-bugs-tmp/mouses-print.imp"
L_000a:;
                                                                //     35        %while x > p %cycle
#line 35 "regression-bugs-tmp/mouses-print.imp"
L_000b:;
#line 35 "regression-bugs-tmp/mouses-print.imp"
if (((X) <= (P))) goto L_000c;
                                                                //     36           x = x - 1
#line 36 "regression-bugs-tmp/mouses-print.imp"
X = (((int)(X)) - (1));
                                                                //     37           s(x) = ' '
#line 37 "regression-bugs-tmp/mouses-print.imp"
S[X] = 32;
                                                                //     38        %repeat
#line 38 "regression-bugs-tmp/mouses-print.imp"
goto L_000b;
#line 38 "regression-bugs-tmp/mouses-print.imp"
L_000c:;
                                                                //     39        x = x - 1
#line 39 "regression-bugs-tmp/mouses-print.imp"
X = (((int)(X)) - (1));
                                                                //     40        s(x) = 72 - x
#line 40 "regression-bugs-tmp/mouses-print.imp"
S[X] = (((int)(72)) - (X));
                                                                //     41        %result = string(addr(s(x)))
#line 41 "regression-bugs-tmp/mouses-print.imp"
/* Remove %on %event handler here if present for this block */
return *_imp_STRING(_imp_ADDR(&S[X]));
                                                                //     42     %end
#line 42 "regression-bugs-tmp/mouses-print.imp"
} // End of block ITOS at level 3
                                                                //     43     printstring(itos(n, p))
#line 43 "regression-bugs-tmp/mouses-print.imp"
_imp_PRINTSTRING(ITOS(N, P));
                                                                //     44  %end
#line 44 "regression-bugs-tmp/mouses-print.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block MOUSESWRITE at level 2
                                                                //     45  %routine mousesprintfl(%real r, %integer places)
#line 45 "regression-bugs-tmp/mouses-print.imp"
void MOUSESPRINTFL( float R, int PLACES )
#line 45 "regression-bugs-tmp/mouses-print.imp"
{
                                                                //     46     %routine round(%real %name v, %integer p)
#line 46 "regression-bugs-tmp/mouses-print.imp"
void ROUND( float /*name*/*V, int P )
#line 46 "regression-bugs-tmp/mouses-print.imp"
{
                                                                //     47        %real x
#line 47 "regression-bugs-tmp/mouses-print.imp"
float X;
                                                                //     48        %return %if v = 0
#line 48 "regression-bugs-tmp/mouses-print.imp"
if (((*V) != (0))) goto L_000e;
#line 48 "regression-bugs-tmp/mouses-print.imp"
/* Remove %on %event handler here if present for this block */
return;
#line 48 "regression-bugs-tmp/mouses-print.imp"
L_000e:;
                                                                //     49        %if v < 0 %then x = -0.5 %else x = 0.5
#line 49 "regression-bugs-tmp/mouses-print.imp"
if (((*V) >= (0))) goto L_000f;
#line 49 "regression-bugs-tmp/mouses-print.imp"
X = (-0.5);
#line 49 "regression-bugs-tmp/mouses-print.imp"
goto L_0010;
#line 49 "regression-bugs-tmp/mouses-print.imp"
L_000f:;
#line 49 "regression-bugs-tmp/mouses-print.imp"
X = 0.5;
#line 49 "regression-bugs-tmp/mouses-print.imp"
L_0010:;
                                                                //     50        %cycle 
#line 50 "regression-bugs-tmp/mouses-print.imp"
L_0011:;
                                                                //     51           p = p - 1
#line 51 "regression-bugs-tmp/mouses-print.imp"
P = (((int)(P)) - (1));
                                                                //     52           %exit %if p < 0
#line 52 "regression-bugs-tmp/mouses-print.imp"
if (((P) >= (0))) goto L_0014;
#line 52 "regression-bugs-tmp/mouses-print.imp"
goto L_0012;
#line 52 "regression-bugs-tmp/mouses-print.imp"
L_0014:;
                                                                //     53           x = x / 10
#line 53 "regression-bugs-tmp/mouses-print.imp"
X = (double)((double)((float)(X)) / (double)((float)(10)));
                                                                //     54        %repeat
#line 54 "regression-bugs-tmp/mouses-print.imp"
goto L_0011;
#line 54 "regression-bugs-tmp/mouses-print.imp"
L_0012:;
                                                                //     55        v = v + x
#line 55 "regression-bugs-tmp/mouses-print.imp"
*V = ((*(float *)(V)) + (X));
                                                                //     56     %end
#line 56 "regression-bugs-tmp/mouses-print.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block ROUND at level 3
                                                                //     57     %routine fraction(%real r, %integer places, %string (*) %name s)
#line 57 "regression-bugs-tmp/mouses-print.imp"
void FRACTION( float R, int PLACES, _imp_string /*%string(255)*/ /*name*/*S )
#line 57 "regression-bugs-tmp/mouses-print.imp"
{
                                                                //     58        %return %if places <= 0
#line 58 "regression-bugs-tmp/mouses-print.imp"
if (((PLACES) > (0))) goto L_0015;
#line 58 "regression-bugs-tmp/mouses-print.imp"
/* Remove %on %event handler here if present for this block */
return;
#line 58 "regression-bugs-tmp/mouses-print.imp"
L_0015:;
                                                                //     59        s = s . "."
#line 59 "regression-bugs-tmp/mouses-print.imp"
*S = _imp_join((_imp_string)*S,(_imp_string)_imp_str_literal("."));
                                                                //     60        %while places > 0 %cycle
#line 60 "regression-bugs-tmp/mouses-print.imp"
L_0016:;
#line 60 "regression-bugs-tmp/mouses-print.imp"
if (((PLACES) <= (0))) goto L_0017;
                                                                //     61           places = places - 1
#line 61 "regression-bugs-tmp/mouses-print.imp"
PLACES = (((int)(PLACES)) - (1));
/*promote*/                                                                //     62           r = fracpt(r) * 10
#line 62 "regression-bugs-tmp/mouses-print.imp"
R = ((_imp_FRACPT(R)) * ((double)(10)));
                                                                //     63           s = s . tostring(intpt(r) + '0')
#line 63 "regression-bugs-tmp/mouses-print.imp"
*S = _imp_join((_imp_string)*S,(_imp_string)_imp_TOSTRING((((int)(_imp_INTPT(R))) + (48))));
                                                                //     64        %repeat
#line 64 "regression-bugs-tmp/mouses-print.imp"
goto L_0016;
#line 64 "regression-bugs-tmp/mouses-print.imp"
L_0017:;
                                                                //     65     %end
#line 65 "regression-bugs-tmp/mouses-print.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block FRACTION at level 3
                                                                //     66     {%external} %string (64) %fn ftos(%real r, %integer p)
#line 66 "regression-bugs-tmp/mouses-print.imp"
_imp_string /*%string(64)*/ FTOS( float R, int P )
#line 66 "regression-bugs-tmp/mouses-print.imp"
{
                                                                //     67        {XOWN}%string (64) s = ""
#line 67 "regression-bugs-tmp/mouses-print.imp"
_imp_string /*%string(64)*/ S;
#line 67 "regression-bugs-tmp/mouses-print.imp"
S = _imp_str_literal("");
                                                                //     68        %integer exp, sym
#line 68 "regression-bugs-tmp/mouses-print.imp"
int EXP;
#line 68 "regression-bugs-tmp/mouses-print.imp"
int SYM;
                                                                //     69        p = 7 %if p > 7
#line 69 "regression-bugs-tmp/mouses-print.imp"
if (((P) <= (7))) goto L_0019;
#line 69 "regression-bugs-tmp/mouses-print.imp"
P = 7;
#line 69 "regression-bugs-tmp/mouses-print.imp"
L_0019:;
                                                                //     70        %if r < 0 %then sym = '-' %and r = -r %else sym = ' '
#line 70 "regression-bugs-tmp/mouses-print.imp"
if (((R) >= (0))) goto L_001a;
#line 70 "regression-bugs-tmp/mouses-print.imp"
SYM = 45;
#line 70 "regression-bugs-tmp/mouses-print.imp"
R = (-(R));
#line 70 "regression-bugs-tmp/mouses-print.imp"
goto L_001b;
#line 70 "regression-bugs-tmp/mouses-print.imp"
L_001a:;
#line 70 "regression-bugs-tmp/mouses-print.imp"
SYM = 32;
#line 70 "regression-bugs-tmp/mouses-print.imp"
L_001b:;
                                                                //     71        %if r = 0 %start
#line 71 "regression-bugs-tmp/mouses-print.imp"
if (((R) != (0))) goto L_001c;
                                                                //     72           exp = -99
#line 72 "regression-bugs-tmp/mouses-print.imp"
EXP = (-99);
                                                                //     73        %else
#line 73 "regression-bugs-tmp/mouses-print.imp"
goto L_001d;
#line 73 "regression-bugs-tmp/mouses-print.imp"
L_001c:;
                                                                //     74           exp = 0
#line 74 "regression-bugs-tmp/mouses-print.imp"
EXP = 0;
                                                                //     75           exp = exp + 1 %and r = r / 10 %while r >= 10
#line 75 "regression-bugs-tmp/mouses-print.imp"
L_001e:;
#line 75 "regression-bugs-tmp/mouses-print.imp"
if (((R) < (10))) goto L_001f;
#line 75 "regression-bugs-tmp/mouses-print.imp"
EXP = (((int)(EXP)) + (1));
#line 75 "regression-bugs-tmp/mouses-print.imp"
R = (double)((double)((float)(R)) / (double)((float)(10)));
#line 75 "regression-bugs-tmp/mouses-print.imp"
goto L_001e;
#line 75 "regression-bugs-tmp/mouses-print.imp"
L_001f:;
/*Warning: potential loss of precision converting from integer AST_ICONST (10 - 4 bytes) to real AST_VAR (R - 4 bytes) detected at ast.c line 108 */
                                                                //     76           exp = exp - 1 %and r = r * 10 %while r < 1
#line 76 "regression-bugs-tmp/mouses-print.imp"
L_0021:;
#line 76 "regression-bugs-tmp/mouses-print.imp"
if (((R) >= (1))) goto L_0022;
#line 76 "regression-bugs-tmp/mouses-print.imp"
EXP = (((int)(EXP)) - (1));
#line 76 "regression-bugs-tmp/mouses-print.imp"
R = ((R) * ((float)(10)));
#line 76 "regression-bugs-tmp/mouses-print.imp"
goto L_0021;
#line 76 "regression-bugs-tmp/mouses-print.imp"
L_0022:;
                                                                //     77        %finish
#line 77 "regression-bugs-tmp/mouses-print.imp"
L_001d:;
                                                                //     78        round(r, p)
#line 78 "regression-bugs-tmp/mouses-print.imp"
ROUND(&R, P);
                                                                //     79        exp = exp + 1 %and r = r / 10 %if r >= 10
#line 79 "regression-bugs-tmp/mouses-print.imp"
if (((R) < (10))) goto L_0024;
#line 79 "regression-bugs-tmp/mouses-print.imp"
EXP = (((int)(EXP)) + (1));
#line 79 "regression-bugs-tmp/mouses-print.imp"
R = (double)((double)((float)(R)) / (double)((float)(10)));
#line 79 "regression-bugs-tmp/mouses-print.imp"
L_0024:;
                                                                //     80        s = s . tostring(intpt(r) + '0')
#line 80 "regression-bugs-tmp/mouses-print.imp"
S = _imp_join((_imp_string)S,(_imp_string)_imp_TOSTRING((((int)(_imp_INTPT(R))) + (48))));
                                                                //     81        fraction(r, p, s)
#line 81 "regression-bugs-tmp/mouses-print.imp"
FRACTION(R, P, &S);
                                                                //     82        s = s . "@" . itos(exp, 0)
#line 82 "regression-bugs-tmp/mouses-print.imp"
S = _imp_join((_imp_string)_imp_join((_imp_string)S,(_imp_string)_imp_str_literal("@")),(_imp_string)_imp_ITOS(EXP, 0));
                                                                //     83        %result = s
#line 83 "regression-bugs-tmp/mouses-print.imp"
/* Remove %on %event handler here if present for this block */
return S;
                                                                //     84     %end
#line 84 "regression-bugs-tmp/mouses-print.imp"
} // End of block FTOS at level 3
                                                                //     85     printstring(ftos(r, places))
#line 85 "regression-bugs-tmp/mouses-print.imp"
_imp_PRINTSTRING(FTOS(R, PLACES));
                                                                //     86  %end
#line 86 "regression-bugs-tmp/mouses-print.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block MOUSESPRINTFL at level 2
                                                                //     87  
                                                                //     88  %endofprogram
#line 88 "regression-bugs-tmp/mouses-print.imp"
/* Remove %on %event handler here if present for this block */
return 0;
} // End of block _imp_main at level 1
#line 88 "regression-bugs-tmp/mouses-print.imp"
// End of file
