#include <perms.h>

                                                                //      1  %systemroutine print(%real x, %integer n,m)
#line 1 "regression-bugs-tmp/print.imp"
extern void print( float X, int N, int M )
#line 1 "regression-bugs-tmp/print.imp"
{
                                                                //      2  %constreal pmax = 2147483647.0
#line 2 "regression-bugs-tmp/print.imp"
const float PMAX = 2147483647.0;
                                                                //      3  %real y,z
#line 3 "regression-bugs-tmp/print.imp"
float Y;
#line 3 "regression-bugs-tmp/print.imp"
float Z;
                                                                //      4  %integer i=0,l,count=0,sign
#line 4 "regression-bugs-tmp/print.imp"
int I;
#line 4 "regression-bugs-tmp/print.imp"
I = 0;
#line 4 "regression-bugs-tmp/print.imp"
int L;
#line 4 "regression-bugs-tmp/print.imp"
int COUNT;
#line 4 "regression-bugs-tmp/print.imp"
COUNT = 0;
#line 4 "regression-bugs-tmp/print.imp"
int SIGN;
                                                                //      5    sign = ' '
#line 5 "regression-bugs-tmp/print.imp"
SIGN = 32;
                                                                //      6    sign = '-' %if x < 0
#line 6 "regression-bugs-tmp/print.imp"
if (((X) >= (0))) goto L_0002;
#line 6 "regression-bugs-tmp/print.imp"
SIGN = 45;
#line 6 "regression-bugs-tmp/print.imp"
L_0002:;
                                                                //      7    y = |x|+0.5/10.0\{^}m;  !modulus, rounded
#line 7 "regression-bugs-tmp/print.imp"
Y = (((_imp_MOD(X))) + (((double)((double)((double)(0.5)) / (double)((_imp_REXP(10.0, M)))))));
                                                                //      8    %if y > pmax %start
#line 8 "regression-bugs-tmp/print.imp"
if (((Y) <= (PMAX))) goto L_0003;
                                                                //      9      count = count+1 %and y = y/10.0 %until y < 10.0
#line 9 "regression-bugs-tmp/print.imp"
L_0004:;
#line 9 "regression-bugs-tmp/print.imp"
COUNT = (((int)(COUNT)) + (1));
#line 9 "regression-bugs-tmp/print.imp"
Y = (double)((double)((float)(Y)) / (double)((double)(10.0)));
#line 9 "regression-bugs-tmp/print.imp"
if (((Y) < (10.0))) goto L_0005;
#line 9 "regression-bugs-tmp/print.imp"
goto L_0004;
#line 9 "regression-bugs-tmp/print.imp"
L_0005:;
                                                                //     10    %finish
#line 10 "regression-bugs-tmp/print.imp"
L_0003:;
                                                                //     11    z = 1.0
#line 11 "regression-bugs-tmp/print.imp"
Z = 1.0;
                                                                //     12    %cycle
#line 12 "regression-bugs-tmp/print.imp"
L_0007:;
                                                                //     13      i = i+1;  z = z*10.0
#line 13 "regression-bugs-tmp/print.imp"
I = (((int)(I)) + (1));
#line 13 "regression-bugs-tmp/print.imp"
Z = (((double)(Z)) * (10.0));
                                                                //     14    %repeat %until z > y
#line 14 "regression-bugs-tmp/print.imp"
if (((Z) > (Y))) goto L_0008;
#line 14 "regression-bugs-tmp/print.imp"
goto L_0007;
#line 14 "regression-bugs-tmp/print.imp"
L_0008:;
                                                                //     15    spaces(n-i)
#line 15 "regression-bugs-tmp/print.imp"
_imp_SPACES((((int)(N)) - (I)));
                                                                //     16    printsymbol(sign) %unless sign = ' ' %and n <= 0
#line 16 "regression-bugs-tmp/print.imp"
if (((SIGN) != (32))) goto L_0009;
#line 16 "regression-bugs-tmp/print.imp"
if (((N) <= (0))) goto L_000a;
#line 16 "regression-bugs-tmp/print.imp"
L_0009:;
#line 16 "regression-bugs-tmp/print.imp"
_imp_PRINTSYMBOL(SIGN);
#line 16 "regression-bugs-tmp/print.imp"
L_000a:;
                                                                //     17    %cycle
#line 17 "regression-bugs-tmp/print.imp"
L_000b:;
                                                                //     18      z = z/10.0
#line 18 "regression-bugs-tmp/print.imp"
Z = (double)((double)((float)(Z)) / (double)((double)(10.0)));
                                                                //     19      l = int pt(y/z)
#line 19 "regression-bugs-tmp/print.imp"
L = _imp_INTPT(((double)((double)((float)(Y)) / (double)((float)(Z)))));
/*Warning: potential loss of precision converting from integer AST_VAR (L - 4 bytes) to real AST_VAR (Z - 4 bytes) detected at ast.c line 108 */
/*promote*/                                                                //     20      y = y-l*z
#line 20 "regression-bugs-tmp/print.imp"
Y = ((Y) - ((float)((((float)(L)) * (Z)))));
                                                                //     21      printsymbol(l+'0')
#line 21 "regression-bugs-tmp/print.imp"
_imp_PRINTSYMBOL((((int)(L)) + (48)));
                                                                //     22      i = i-1
#line 22 "regression-bugs-tmp/print.imp"
I = (((int)(I)) - (1));
                                                                //     23      %exit %if i+m <= 0
#line 23 "regression-bugs-tmp/print.imp"
if ((((((int)(I)) + (M))) > (0))) goto L_000e;
#line 23 "regression-bugs-tmp/print.imp"
goto L_000c;
#line 23 "regression-bugs-tmp/print.imp"
L_000e:;
                                                                //     24      print symbol('.') %if i = 0
#line 24 "regression-bugs-tmp/print.imp"
if (((I) != (0))) goto L_000f;
#line 24 "regression-bugs-tmp/print.imp"
_imp_PRINTSYMBOL(46);
#line 24 "regression-bugs-tmp/print.imp"
L_000f:;
                                                                //     25    %repeat
#line 25 "regression-bugs-tmp/print.imp"
goto L_000b;
#line 25 "regression-bugs-tmp/print.imp"
L_000c:;
                                                                //     26    printsymbol('@') %and write(count,0) %if count # 0
#line 26 "regression-bugs-tmp/print.imp"
if (((COUNT) == (0))) goto L_0010;
#line 26 "regression-bugs-tmp/print.imp"
_imp_PRINTSYMBOL(64);
#line 26 "regression-bugs-tmp/print.imp"
_imp_WRITE(COUNT, 0);
#line 26 "regression-bugs-tmp/print.imp"
L_0010:;
                                                                //     27  %end;  !print
#line 27 "regression-bugs-tmp/print.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block print at level 1
                                                                //     28  
                                                                //     29  %endoffile
#line 29 "regression-bugs-tmp/print.imp"
// End of file
