#include <perms.h>

                                                                //      1  %begin
#line 1 "regression-bugs-tmp/printfl-apm.imp"
int main(int argc, char **argv) {
  __label__ _imp_endofblock;
  _imp_initialise(argc, argv);
                                                                //      2  
                                                                //      3  %routine print 68k(%real x, %integer n,m)
_imp_current_line = 3; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 3 "regression-bugs-tmp/printfl-apm.imp"
void PRINT68K( float X, int N, int M )
#line 3 "regression-bugs-tmp/printfl-apm.imp"
{
  __label__ _imp_endofblock;
                                                                //      4  %constreal pmax = 2147483647.0
_imp_current_line = 4; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 4 "regression-bugs-tmp/printfl-apm.imp"
const float PMAX = 2147483647.0;
                                                                //      5  %real y,z
_imp_current_line = 5; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 5 "regression-bugs-tmp/printfl-apm.imp"
float Y;
#line 5 "regression-bugs-tmp/printfl-apm.imp"
float Z;
                                                                //      6  %integer i=0,l,count=0,sign
_imp_current_line = 6; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 6 "regression-bugs-tmp/printfl-apm.imp"
int I;
#line 6 "regression-bugs-tmp/printfl-apm.imp"
I = 0;
#line 6 "regression-bugs-tmp/printfl-apm.imp"
int L;
#line 6 "regression-bugs-tmp/printfl-apm.imp"
int COUNT;
#line 6 "regression-bugs-tmp/printfl-apm.imp"
COUNT = 0;
#line 6 "regression-bugs-tmp/printfl-apm.imp"
int SIGN;
                                                                //      7    sign = ' '
_imp_current_line = 7; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 7 "regression-bugs-tmp/printfl-apm.imp"
SIGN = 32;
                                                                //      8    sign = '-' %if x < 0
_imp_current_line = 8; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 8 "regression-bugs-tmp/printfl-apm.imp"
if (((X) >= (0))) goto L_0002;
#line 8 "regression-bugs-tmp/printfl-apm.imp"
SIGN = 45;
#line 8 "regression-bugs-tmp/printfl-apm.imp"
L_0002:;
                                                                //      9    y = |x|+0.5/10.0\{^}m;  !modulus, rounded
_imp_current_line = 9; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 9 "regression-bugs-tmp/printfl-apm.imp"
Y = (((_imp_MOD(X))) + (((double)((double)((double)(0.5)) / (double)((_imp_REXP(10.0, M)))))));
                                                                //     10    %if y > pmax %start
_imp_current_line = 10; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 10 "regression-bugs-tmp/printfl-apm.imp"
if (((Y) <= (PMAX))) goto L_0003;
                                                                //     11      count = count+1 %and y = y/10.0 %until y < 10.0
_imp_current_line = 11; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 11 "regression-bugs-tmp/printfl-apm.imp"
L_0004:;
#line 11 "regression-bugs-tmp/printfl-apm.imp"
COUNT = (((int)(COUNT)) + (1));
#line 11 "regression-bugs-tmp/printfl-apm.imp"
Y = (double)((double)((float)(Y)) / (double)((double)(10.0)));
#line 11 "regression-bugs-tmp/printfl-apm.imp"
if (((Y) < (10.0))) goto L_0005;
#line 11 "regression-bugs-tmp/printfl-apm.imp"
goto L_0004;
#line 11 "regression-bugs-tmp/printfl-apm.imp"
L_0005:;
                                                                //     12    %finish
_imp_current_line = 12; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 12 "regression-bugs-tmp/printfl-apm.imp"
L_0003:;
                                                                //     13    z = 1.0
_imp_current_line = 13; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 13 "regression-bugs-tmp/printfl-apm.imp"
Z = 1.0;
                                                                //     14    %cycle
_imp_current_line = 14; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 14 "regression-bugs-tmp/printfl-apm.imp"
L_0007:;
                                                                //     15      i = i+1;  z = z*10.0
_imp_current_line = 15; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 15 "regression-bugs-tmp/printfl-apm.imp"
I = (((int)(I)) + (1));
_imp_current_line = 15; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 15 "regression-bugs-tmp/printfl-apm.imp"
Z = (((double)(Z)) * (10.0));
                                                                //     16    %repeat %until z > y
_imp_current_line = 16; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 16 "regression-bugs-tmp/printfl-apm.imp"
if (((Z) > (Y))) goto L_0008;
#line 16 "regression-bugs-tmp/printfl-apm.imp"
goto L_0007;
#line 16 "regression-bugs-tmp/printfl-apm.imp"
L_0008:;
                                                                //     17    spaces(n-i)
_imp_current_line = 17; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 17 "regression-bugs-tmp/printfl-apm.imp"
_imp_SPACES((((int)(N)) - (I)));
                                                                //     18    printsymbol(sign) %unless sign = ' ' %and n <= 0
_imp_current_line = 18; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 18 "regression-bugs-tmp/printfl-apm.imp"
if (((SIGN) != (32))) goto L_0009;
#line 18 "regression-bugs-tmp/printfl-apm.imp"
if (((N) <= (0))) goto L_000a;
#line 18 "regression-bugs-tmp/printfl-apm.imp"
L_0009:;
#line 18 "regression-bugs-tmp/printfl-apm.imp"
_imp_PRINTSYMBOL(SIGN);
#line 18 "regression-bugs-tmp/printfl-apm.imp"
L_000a:;
                                                                //     19    %cycle
_imp_current_line = 19; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 19 "regression-bugs-tmp/printfl-apm.imp"
L_000b:;
                                                                //     20      z = z/10.0
_imp_current_line = 20; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 20 "regression-bugs-tmp/printfl-apm.imp"
Z = (double)((double)((float)(Z)) / (double)((double)(10.0)));
                                                                //     21      l = int pt(y/z)
_imp_current_line = 21; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 21 "regression-bugs-tmp/printfl-apm.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*/                                                                //     22      y = y-l*z
_imp_current_line = 22; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 22 "regression-bugs-tmp/printfl-apm.imp"
Y = ((Y) - ((float)((((float)(L)) * (Z)))));
                                                                //     23      printsymbol(l+'0')
_imp_current_line = 23; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 23 "regression-bugs-tmp/printfl-apm.imp"
_imp_PRINTSYMBOL((((int)(L)) + (48)));
                                                                //     24      i = i-1
_imp_current_line = 24; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 24 "regression-bugs-tmp/printfl-apm.imp"
I = (((int)(I)) - (1));
                                                                //     25      %exit %if i+m <= 0
_imp_current_line = 25; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 25 "regression-bugs-tmp/printfl-apm.imp"
if ((((((int)(I)) + (M))) > (0))) goto L_000e;
#line 25 "regression-bugs-tmp/printfl-apm.imp"
goto L_000c;
#line 25 "regression-bugs-tmp/printfl-apm.imp"
L_000e:;
                                                                //     26      print symbol('.') %if i = 0
_imp_current_line = 26; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 26 "regression-bugs-tmp/printfl-apm.imp"
if (((I) != (0))) goto L_000f;
#line 26 "regression-bugs-tmp/printfl-apm.imp"
_imp_PRINTSYMBOL(46);
#line 26 "regression-bugs-tmp/printfl-apm.imp"
L_000f:;
                                                                //     27    %repeat
_imp_current_line = 27; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 27 "regression-bugs-tmp/printfl-apm.imp"
goto L_000b;
#line 27 "regression-bugs-tmp/printfl-apm.imp"
L_000c:;
                                                                //     28    printsymbol('@') {%and write 68k(count,0)} %if count # 0
_imp_current_line = 28; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 28 "regression-bugs-tmp/printfl-apm.imp"
if (((COUNT) == (0))) goto L_0010;
#line 28 "regression-bugs-tmp/printfl-apm.imp"
_imp_PRINTSYMBOL(64);
#line 28 "regression-bugs-tmp/printfl-apm.imp"
L_0010:;
                                                                //     29  %end;  !print
_imp_current_line = 29; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 29 "regression-bugs-tmp/printfl-apm.imp"
return;
_imp_endofblock: ;
} // End of block PRINT68K at level 2
                                                                //     30  
                                                                //     31  %routine printfl 68k(%real x, %integer n)
_imp_current_line = 31; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 31 "regression-bugs-tmp/printfl-apm.imp"
void PRINTFL68K( float X, int N )
#line 31 "regression-bugs-tmp/printfl-apm.imp"
{
  __label__ _imp_endofblock;
                                                                //     32  %real y,round
_imp_current_line = 32; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 32 "regression-bugs-tmp/printfl-apm.imp"
float Y;
#line 32 "regression-bugs-tmp/printfl-apm.imp"
float ROUND;
                                                                //     33  %integer count=-99,sign=0
_imp_current_line = 33; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 33 "regression-bugs-tmp/printfl-apm.imp"
int COUNT;
#line 33 "regression-bugs-tmp/printfl-apm.imp"
COUNT = (-99);
#line 33 "regression-bugs-tmp/printfl-apm.imp"
int SIGN;
#line 33 "regression-bugs-tmp/printfl-apm.imp"
SIGN = 0;
                                                                //     34    %if x # 0 %start
_imp_current_line = 34; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 34 "regression-bugs-tmp/printfl-apm.imp"
if (((X) == (0))) goto L_0011;
                                                                //     35      x = -x %and sign = 1 %if x < 0
_imp_current_line = 35; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 35 "regression-bugs-tmp/printfl-apm.imp"
if (((X) >= (0))) goto L_0012;
#line 35 "regression-bugs-tmp/printfl-apm.imp"
X = (-(X));
#line 35 "regression-bugs-tmp/printfl-apm.imp"
SIGN = 1;
#line 35 "regression-bugs-tmp/printfl-apm.imp"
L_0012:;
                                                                //     36     !Adjust X so that 1.0 <= rounded(X) < 10.0
                                                                //     37      count = 0;  round = 0.5\{^}n
_imp_current_line = 37; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 37 "regression-bugs-tmp/printfl-apm.imp"
COUNT = 0;
_imp_current_line = 37; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 37 "regression-bugs-tmp/printfl-apm.imp"
ROUND = _imp_REXP(0.5, N);
                                                                //     38      y = 1.0-round
_imp_current_line = 38; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 38 "regression-bugs-tmp/printfl-apm.imp"
Y = ((1.0) - ((double)(ROUND)));
                                                                //     39      %if x < y %start;  !ie rounded(X) < 1.0
_imp_current_line = 39; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 39 "regression-bugs-tmp/printfl-apm.imp"
if (((X) >= (Y))) goto L_0013;
                                                                //     40        count = count-1 %and x = x*10.0 %until x >= y
_imp_current_line = 40; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 40 "regression-bugs-tmp/printfl-apm.imp"
L_0014:;
#line 40 "regression-bugs-tmp/printfl-apm.imp"
COUNT = (((int)(COUNT)) - (1));
#line 40 "regression-bugs-tmp/printfl-apm.imp"
X = (((double)(X)) * (10.0));
#line 40 "regression-bugs-tmp/printfl-apm.imp"
if (((X) >= (Y))) goto L_0015;
#line 40 "regression-bugs-tmp/printfl-apm.imp"
goto L_0014;
#line 40 "regression-bugs-tmp/printfl-apm.imp"
L_0015:;
                                                                //     41      %finish %else %start
_imp_current_line = 41; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 41 "regression-bugs-tmp/printfl-apm.imp"
goto L_0017;
#line 41 "regression-bugs-tmp/printfl-apm.imp"
L_0013:;
                                                                //     42        y = 10.0-round
_imp_current_line = 42; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 42 "regression-bugs-tmp/printfl-apm.imp"
Y = ((10.0) - ((double)(ROUND)));
                                                                //     43        %while x >= y %cycle;  !ie rounded(X) > 10.0
_imp_current_line = 43; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 43 "regression-bugs-tmp/printfl-apm.imp"
L_0018:;
#line 43 "regression-bugs-tmp/printfl-apm.imp"
if (((X) < (Y))) goto L_0019;
                                                                //     44          count = count+1;  x = x/10.0
_imp_current_line = 44; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 44 "regression-bugs-tmp/printfl-apm.imp"
COUNT = (((int)(COUNT)) + (1));
_imp_current_line = 44; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 44 "regression-bugs-tmp/printfl-apm.imp"
X = (double)((double)((float)(X)) / (double)((double)(10.0)));
                                                                //     45        %repeat
_imp_current_line = 45; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 45 "regression-bugs-tmp/printfl-apm.imp"
goto L_0018;
#line 45 "regression-bugs-tmp/printfl-apm.imp"
L_0019:;
                                                                //     46      %finish
_imp_current_line = 46; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 46 "regression-bugs-tmp/printfl-apm.imp"
L_0017:;
                                                                //     47      x = -x %if sign # 0
_imp_current_line = 47; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 47 "regression-bugs-tmp/printfl-apm.imp"
if (((SIGN) == (0))) goto L_001b;
#line 47 "regression-bugs-tmp/printfl-apm.imp"
X = (-(X));
#line 47 "regression-bugs-tmp/printfl-apm.imp"
L_001b:;
                                                                //     48    %finish
_imp_current_line = 48; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 48 "regression-bugs-tmp/printfl-apm.imp"
L_0011:;
                                                                //     49    print 68k(x,1,n)
_imp_current_line = 49; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 49 "regression-bugs-tmp/printfl-apm.imp"
PRINT68K(X, 1, N);
                                                                //     50    printsymbol('@')
_imp_current_line = 50; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 50 "regression-bugs-tmp/printfl-apm.imp"
_imp_PRINTSYMBOL(64);
                                                                //     51  !  write 68k(count,0)
                                                                //     52  %end;  !printfl
_imp_current_line = 52; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 52 "regression-bugs-tmp/printfl-apm.imp"
return;
_imp_endofblock: ;
} // End of block PRINTFL68K at level 2
                                                                //     53  
                                                                //     54  %endofprogram
_imp_current_line = 54; _imp_current_file = "regression-bugs-tmp/printfl-apm.imp";
#line 54 "regression-bugs-tmp/printfl-apm.imp"
return 0;
_imp_endofblock: ;
} // End of block _imp_main at level 1
#line 54 "regression-bugs-tmp/printfl-apm.imp"
// End of file
