#include <perms.h>

                                                                //      1  %begin
#line 1 "regression-bugs-tmp/dec10-print.imp"
int main(int argc, char **argv) {
  __label__ _imp_endofblock;
  _imp_initialise(argc, argv);
                                                                //      2  
                                                                //      3  %ROUTINE DEC10 FRACTION(%REAL R, %INTEGER PLACES)
_imp_current_line = 3; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 3 "regression-bugs-tmp/dec10-print.imp"
void DEC10FRACTION( float R, int PLACES )
#line 3 "regression-bugs-tmp/dec10-print.imp"
{
  __label__ _imp_endofblock;
                                                                //      4     %RETURN %IF PLACES<=0
_imp_current_line = 4; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 4 "regression-bugs-tmp/dec10-print.imp"
if (((PLACES) > (0))) goto L_0002;
#line 4 "regression-bugs-tmp/dec10-print.imp"
return;
#line 4 "regression-bugs-tmp/dec10-print.imp"
L_0002:;
                                                                //      5     PRINTSYMBOL('.')
_imp_current_line = 5; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 5 "regression-bugs-tmp/dec10-print.imp"
_imp_PRINTSYMBOL(46);
                                                                //      6     %WHILE PLACES>0 %CYCLE
_imp_current_line = 6; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 6 "regression-bugs-tmp/dec10-print.imp"
L_0003:;
#line 6 "regression-bugs-tmp/dec10-print.imp"
if (((PLACES) <= (0))) goto L_0004;
                                                                //      7        R = FRACPT(R)*10.0
_imp_current_line = 7; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 7 "regression-bugs-tmp/dec10-print.imp"
R = (((double)(_imp_FRACPT(R))) * (10.0));
                                                                //      8        PLACES=PLACES-1
_imp_current_line = 8; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 8 "regression-bugs-tmp/dec10-print.imp"
PLACES = (((int)(PLACES)) - (1));
                                                                //      9        PRINTSYMBOL(INTPT(R)+'0')
_imp_current_line = 9; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 9 "regression-bugs-tmp/dec10-print.imp"
_imp_PRINTSYMBOL((((int)(_imp_INTPT(R))) + (48)));
                                                                //     10     %REPEAT
_imp_current_line = 10; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 10 "regression-bugs-tmp/dec10-print.imp"
goto L_0003;
#line 10 "regression-bugs-tmp/dec10-print.imp"
L_0004:;
                                                                //     11  %END
_imp_current_line = 11; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 11 "regression-bugs-tmp/dec10-print.imp"
return;
_imp_endofblock: ;
} // End of block DEC10FRACTION at level 2
                                                                //     12  
                                                                //     13  %ROUTINE DEC10 PRINTFL(%REAL R, %INTEGER P)
_imp_current_line = 13; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 13 "regression-bugs-tmp/dec10-print.imp"
void DEC10PRINTFL( float R, int P )
#line 13 "regression-bugs-tmp/dec10-print.imp"
{
  __label__ _imp_endofblock;
                                                                //     14     %INTEGER EXP,SIGN
_imp_current_line = 14; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 14 "regression-bugs-tmp/dec10-print.imp"
int EXP;
#line 14 "regression-bugs-tmp/dec10-print.imp"
int SIGN;
                                                                //     15     SIGN=' '
_imp_current_line = 15; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 15 "regression-bugs-tmp/dec10-print.imp"
SIGN = 32;
                                                                //     16     SIGN='-' %AND R=-R %IF R<0
_imp_current_line = 16; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 16 "regression-bugs-tmp/dec10-print.imp"
if (((R) >= (0))) goto L_0006;
#line 16 "regression-bugs-tmp/dec10-print.imp"
SIGN = 45;
#line 16 "regression-bugs-tmp/dec10-print.imp"
R = (-(R));
#line 16 "regression-bugs-tmp/dec10-print.imp"
L_0006:;
                                                                //     17     PRINTSYMBOL(SIGN)
_imp_current_line = 17; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 17 "regression-bugs-tmp/dec10-print.imp"
_imp_PRINTSYMBOL(SIGN);
                                                                //     18     %IF R=0 %START
_imp_current_line = 18; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 18 "regression-bugs-tmp/dec10-print.imp"
if (((R) != (0))) goto L_0007;
                                                                //     19        EXP=-99
_imp_current_line = 19; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 19 "regression-bugs-tmp/dec10-print.imp"
EXP = (-99);
                                                                //     20     %ELSE
_imp_current_line = 20; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 20 "regression-bugs-tmp/dec10-print.imp"
goto L_0008;
#line 20 "regression-bugs-tmp/dec10-print.imp"
L_0007:;
                                                                //     21        %IF P<=0 %START
_imp_current_line = 21; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 21 "regression-bugs-tmp/dec10-print.imp"
if (((P) > (0))) goto L_0009;
                                                                //     22           R=R+0.5
_imp_current_line = 22; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 22 "regression-bugs-tmp/dec10-print.imp"
R = (((double)(R)) + (0.5));
                                                                //     23        %ELSE
_imp_current_line = 23; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 23 "regression-bugs-tmp/dec10-print.imp"
goto L_000a;
#line 23 "regression-bugs-tmp/dec10-print.imp"
L_0009:;
/*promote*/                                                                //     24           R=R+0.5*10\(-P)
_imp_current_line = 24; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 24 "regression-bugs-tmp/dec10-print.imp"
R = ((R) + ((float)(((0.5) * ((double)(_imp_REXP(10, (-(P)))))))));
                                                                //     25        %FINISH
_imp_current_line = 25; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 25 "regression-bugs-tmp/dec10-print.imp"
L_000a:;
                                                                //     26        EXP=0
_imp_current_line = 26; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 26 "regression-bugs-tmp/dec10-print.imp"
EXP = 0;
                                                                //     27        EXP=EXP+1 %AND R=R*0.1 %WHILE R >=10.0
_imp_current_line = 27; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 27 "regression-bugs-tmp/dec10-print.imp"
L_000b:;
#line 27 "regression-bugs-tmp/dec10-print.imp"
if (((R) < (10.0))) goto L_000c;
#line 27 "regression-bugs-tmp/dec10-print.imp"
EXP = (((int)(EXP)) + (1));
#line 27 "regression-bugs-tmp/dec10-print.imp"
R = (((double)(R)) * (0.1));
#line 27 "regression-bugs-tmp/dec10-print.imp"
goto L_000b;
#line 27 "regression-bugs-tmp/dec10-print.imp"
L_000c:;
                                                                //     28        EXP=EXP-1 %AND R=R*10.0 %WHILE R< 1.0
_imp_current_line = 28; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 28 "regression-bugs-tmp/dec10-print.imp"
L_000e:;
#line 28 "regression-bugs-tmp/dec10-print.imp"
if (((R) >= (1.0))) goto L_000f;
#line 28 "regression-bugs-tmp/dec10-print.imp"
EXP = (((int)(EXP)) - (1));
#line 28 "regression-bugs-tmp/dec10-print.imp"
R = (((double)(R)) * (10.0));
#line 28 "regression-bugs-tmp/dec10-print.imp"
goto L_000e;
#line 28 "regression-bugs-tmp/dec10-print.imp"
L_000f:;
                                                                //     29     %FINISH
_imp_current_line = 29; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 29 "regression-bugs-tmp/dec10-print.imp"
L_0008:;
                                                                //     30     PRINTSYMBOL(INT PT(R)+'0')
_imp_current_line = 30; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 30 "regression-bugs-tmp/dec10-print.imp"
_imp_PRINTSYMBOL((((int)(_imp_INTPT(R))) + (48)));
                                                                //     31     DEC10 FRACTION(R,P)
_imp_current_line = 31; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 31 "regression-bugs-tmp/dec10-print.imp"
DEC10FRACTION(R, P);
                                                                //     32     PRINTSYMBOL('@'); WRITE(EXP,1)
_imp_current_line = 32; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 32 "regression-bugs-tmp/dec10-print.imp"
_imp_PRINTSYMBOL(64);
_imp_current_line = 32; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 32 "regression-bugs-tmp/dec10-print.imp"
_imp_WRITE(EXP, 1);
                                                                //     33  %END
_imp_current_line = 33; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 33 "regression-bugs-tmp/dec10-print.imp"
return;
_imp_endofblock: ;
} // End of block DEC10PRINTFL at level 2
                                                                //     34  
                                                                //     35  %ROUTINE DEC10 PRINT(%REAL R, %INTEGER B,A)
_imp_current_line = 35; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 35 "regression-bugs-tmp/dec10-print.imp"
void DEC10PRINT( float R, int B, int A )
#line 35 "regression-bugs-tmp/dec10-print.imp"
{
  __label__ _imp_endofblock;
                                                                //     36     %REAL RM
_imp_current_line = 36; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 36 "regression-bugs-tmp/dec10-print.imp"
float RM;
                                                                //     37     %CONSTINTEGER MAX INT= 8_377777777777
_imp_current_line = 37; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
                                                                //     38     %INTEGER SIGN
_imp_current_line = 38; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 38 "regression-bugs-tmp/dec10-print.imp"
int SIGN;
                                                                //     39     %ROUTINE P(%INTEGER N)
_imp_current_line = 39; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 39 "regression-bugs-tmp/dec10-print.imp"
void P( int N )
#line 39 "regression-bugs-tmp/dec10-print.imp"
{
  __label__ _imp_endofblock;
                                                                //     40        B = B-1
_imp_current_line = 40; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 40 "regression-bugs-tmp/dec10-print.imp"
B = (((int)(B)) - (1));
                                                                //     41        P(N//10) %IF N >= 10
_imp_current_line = 41; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 41 "regression-bugs-tmp/dec10-print.imp"
if (((N) < (10))) goto L_0011;
#line 41 "regression-bugs-tmp/dec10-print.imp"
P(((long)((long)((int)(N)) / (long)((int)(10)))));
#line 41 "regression-bugs-tmp/dec10-print.imp"
L_0011:;
                                                                //     42        %IF SIGN # 0 %START
_imp_current_line = 42; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 42 "regression-bugs-tmp/dec10-print.imp"
if (((SIGN) == (0))) goto L_0012;
                                                                //     43           SPACES(B-1)
_imp_current_line = 43; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 43 "regression-bugs-tmp/dec10-print.imp"
_imp_SPACES((((int)(B)) - (1)));
                                                                //     44           PRINTSYMBOL(SIGN);  SIGN = 0
_imp_current_line = 44; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 44 "regression-bugs-tmp/dec10-print.imp"
_imp_PRINTSYMBOL(SIGN);
_imp_current_line = 44; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 44 "regression-bugs-tmp/dec10-print.imp"
SIGN = 0;
                                                                //     45        %FINISH
_imp_current_line = 45; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 45 "regression-bugs-tmp/dec10-print.imp"
L_0012:;
                                                                //     46        PRINTSYMBOL(REM(N,10)+'0')
_imp_current_line = 46; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 46 "regression-bugs-tmp/dec10-print.imp"
_imp_PRINTSYMBOL((((int)(_imp_REM(N, 10))) + (48)));
                                                                //     47     %END
_imp_current_line = 47; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 47 "regression-bugs-tmp/dec10-print.imp"
return;
_imp_endofblock: ;
} // End of block P at level 3
                                                                //     48     RM=|R|
_imp_current_line = 48; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 48 "regression-bugs-tmp/dec10-print.imp"
RM = _imp_MOD(R);
                                                                //     49     DEC10 PRINTFL(R, B+A) %AND %RETURN %IF RM> MAX INT
_imp_current_line = 49; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 49 "regression-bugs-tmp/dec10-print.imp"
if (((RM) <= ((-1)))) goto L_0013;
#line 49 "regression-bugs-tmp/dec10-print.imp"
DEC10PRINTFL(R, (((int)(B)) + (A)));
#line 49 "regression-bugs-tmp/dec10-print.imp"
return;
#line 49 "regression-bugs-tmp/dec10-print.imp"
L_0013:;
                                                                //     50     %IF A<=0 %START
_imp_current_line = 50; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 50 "regression-bugs-tmp/dec10-print.imp"
if (((A) > (0))) goto L_0014;
                                                                //     51        RM=RM+0.5
_imp_current_line = 51; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 51 "regression-bugs-tmp/dec10-print.imp"
RM = (((double)(RM)) + (0.5));
                                                                //     52     %ELSE
_imp_current_line = 52; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 52 "regression-bugs-tmp/dec10-print.imp"
goto L_0015;
#line 52 "regression-bugs-tmp/dec10-print.imp"
L_0014:;
/*promote*/                                                                //     53        RM=RM+0.5*10\(-A)
_imp_current_line = 53; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 53 "regression-bugs-tmp/dec10-print.imp"
RM = ((RM) + ((float)(((0.5) * ((double)(_imp_REXP(10, (-(A)))))))));
                                                                //     54     %FINISH
_imp_current_line = 54; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 54 "regression-bugs-tmp/dec10-print.imp"
L_0015:;
                                                                //     55     %IF B<=0 %THEN SIGN=0 %ELSE SIGN=' '
_imp_current_line = 55; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 55 "regression-bugs-tmp/dec10-print.imp"
if (((B) > (0))) goto L_0016;
#line 55 "regression-bugs-tmp/dec10-print.imp"
SIGN = 0;
#line 55 "regression-bugs-tmp/dec10-print.imp"
goto L_0017;
#line 55 "regression-bugs-tmp/dec10-print.imp"
L_0016:;
#line 55 "regression-bugs-tmp/dec10-print.imp"
SIGN = 32;
#line 55 "regression-bugs-tmp/dec10-print.imp"
L_0017:;
                                                                //     56     %IF R<0 %THEN SIGN='-'
_imp_current_line = 56; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 56 "regression-bugs-tmp/dec10-print.imp"
if (((R) >= (0))) goto L_0018;
#line 56 "regression-bugs-tmp/dec10-print.imp"
SIGN = 45;
#line 56 "regression-bugs-tmp/dec10-print.imp"
L_0018:;
                                                                //     57     P(INT PT(RM));  !THUS ALLOWING FOR -0.1 ETC.
_imp_current_line = 57; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 57 "regression-bugs-tmp/dec10-print.imp"
P(_imp_INTPT(RM));
                                                                //     58     DEC10 FRACTION(RM,A)
_imp_current_line = 58; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 58 "regression-bugs-tmp/dec10-print.imp"
DEC10FRACTION(RM, A);
                                                                //     59  %END
_imp_current_line = 59; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 59 "regression-bugs-tmp/dec10-print.imp"
return;
_imp_endofblock: ;
} // End of block DEC10PRINT at level 2
                                                                //     60  
                                                                //     61  %endofprogram
_imp_current_line = 61; _imp_current_file = "regression-bugs-tmp/dec10-print.imp";
#line 61 "regression-bugs-tmp/dec10-print.imp"
return 0;
_imp_endofblock: ;
} // End of block _imp_main at level 1
#line 61 "regression-bugs-tmp/dec10-print.imp"
// End of file
