#include <perms.h>

                                                                //      1  !* Program name : IMULT
                                                                //      2  
                                                                //      3  !*   Title      :  VI.a    The IMP  INTEGER  Facilities
                                                                //      4  !*   Version    :  II
                                                                //      5  !*   Date       :  24 August 1985
                                                                //      6  !*   Description:  Tests the Multiplication, Division, Exponentiation and
                                                                //      7  !*                 the REM function.
                                                                //      8  
                                                                //      9  %Begin
int main(int argc, char **argv) {
  _imp_initialise(argc, argv);
                                                                //     10  
                                                                //     11     %string(255) param    { Used to get input from CLI}
_imp_string /*%string(255)*/ PARAM;
                                                                //     12  
                                                                //     13     %Integer J 
int J;
                                                                //     14     %Integer K 
int K;
                                                                //     15     %Integer M
int M;
                                                                //     16     %Integer P
int P;
                                                                //     17     %Integer Q
int Q;
                                                                //     18  
                                                                //     19     %Constant %Integer  CInt3 = 10
                                                                //     20     %Constant %Integer  CInt4 = 3
                                                                //     21  
                                                                //     22  %owninteger failures=0
static int FAILURES = 0;
                                                                //     23  
                                                                //     24  %routine pass
void PASS( void )
{
                                                                //     25    printstring("Pass")
_imp_PRINTSTRING(_imp_str_literal("Pass"));
                                                                //     26    New Line
_imp_NEWLINE();
                                                                //     27  %end
/* Remove %on %event handler here if present for this block */
return;
} // End of block PASS at level 2
                                                                //     28  %routine fail
void FAIL( void )
{
                                                                //     29    printstring("FAIL")
_imp_PRINTSTRING(_imp_str_literal("FAIL"));
                                                                //     30    New Line
_imp_NEWLINE();
                                                                //     31    failures = failures+1
FAILURES = (((int)(FAILURES)) + (1));
                                                                //     32  %end
/* Remove %on %event handler here if present for this block */
return;
} // End of block FAIL at level 2
                                                                //     33  
                                                                //     34  
                                                                //     35        
                                                                //     36  
                                                                //     37     %Integer %Function  F
int F( void )
{
                                                                //     38  
                                                                //     39       !*  An extremely simple integer function that merely
                                                                //     40       !*  returns the number THREE.  Note that this function 
                                                                //     41       !*  does not presuppose parameter passing or expression
                                                                //     42       !*  evaluation within functions.  It merely tests the
                                                                //     43       !*  ability to encorporate functions within expressions. 
                                                                //     44                                                             
                                                                //     45       %Result = 3
/* Remove %on %event handler here if present for this block */
return 3;
                                                                //     46  
                                                                //     47      %End
} // End of block F at level 2
                                                                //     48  
                                                                //     49  
                                                                //     50  
                                                                //     51     ! Code to find out where the output is to be sent
                                                                //     52     ! -----------------------------------------------
                                                                //     53     ! Where the output goes to depends on the parameter after the
                                                                //     54     ! name used to run the program.
                                                                //     55     !                       Parameter   |   Result
                                                                //     56     !                       ------------|-------------
                                                                //     57     !                     No parameter  |  No output
                                                                //     58     !                          "s"      |  The screen
                                                                //     59     !                          "j"      |  "journal"
                                                                //     60     !                     anything else |  file name entered
                                                                //     61  
                                                                //     62     ! NOTE THAT THIS CODE USES STRING COMPARISONS, WHICH MAY NOT HAVE BEEN
                                                                //     63     ! TESTED YET. IF THE PROGRAM FAILS CHECK IT WAS NOT IN THIS PART.
                                                                //     64  
                                                                //     65     param=cliparam
PARAM = _imp_CLIPARAM();
                                                                //     66     %if param = "" %then select output (2) %c
if ((_imp_strcmp(PARAM, _imp_str_literal("")) != 0)) goto L_0002;
_imp_SELECTOUTPUT(2);
goto L_0003;
L_0002:;
if ((_imp_strcmp(PARAM, _imp_str_literal("s")) == 0)) goto L_0004;
if ((_imp_strcmp(PARAM, _imp_str_literal("S")) != 0)) goto L_0005;
L_0004:;
_imp_SELECTOUTPUT(1);
goto L_0003;
L_0005:;
if ((_imp_strcmp(PARAM, _imp_str_literal("j")) == 0)) goto L_0006;
if ((_imp_strcmp(PARAM, _imp_str_literal("J")) != 0)) goto L_0007;
L_0006:;
_imp_OPENOUTPUT(2, _imp_str_literal("journal"));
_imp_SELECTOUTPUT(2);
goto L_0003;
L_0007:;
_imp_OPENOUTPUT(2, PARAM);
_imp_SELECTOUTPUT(2);
L_0003:;
                                                                //     67     %else %if param="s" %or param="S" %then select output(1) %c
                                                                //     68     %else %if param="j" %or param="J" %then  %c
                                                                //     69        open output(2,"journal") %and select output (2) %c
                                                                //     70     %else open output(2,param) %and select output (2)
                                                                //     71     
                                                                //     72  
                                                                //     73  
                                                                //     74  
                                                                //     75     New Lines(2)
_imp_NEWLINES(2);
                                                                //     76     Print String ("INTEGER Arithmetic Validation");   New Line
_imp_PRINTSTRING(_imp_str_literal("INTEGER Arithmetic Validation"));
_imp_NEWLINE();
                                                                //     77     Print String ("=============================");   New Lines (3)
_imp_PRINTSTRING(_imp_str_literal("============================="));
_imp_NEWLINES(3);
                                                                //     78  
                                                                //     79  
                                                                //     80  
                                                                //     81     Print String ("Test the INTEGER Arithmetic Operators");  New Line
_imp_PRINTSTRING(_imp_str_literal("Test the INTEGER Arithmetic Operators"));
_imp_NEWLINE();
                                                                //     82     Print String ("-------------------------------------");  New Line
_imp_PRINTSTRING(_imp_str_literal("-------------------------------------"));
_imp_NEWLINE();
                                                                //     83  
                                                                //     84  
                                                                //     85  
                                                                //     86  
                                                                //     87     !*   Test the INTEGER MULTIPLICATION 
                                                                //     88            
                                                                //     89     !*  Test the ability to be assigned after a expression evaluation.
                                                                //     90     !*  In each of the following six tests, the destination variable
                                                                //     91     !*  is the same as one of the expression arguments.  All arguments
                                                                //     92     !*  are at full %INTEGER precision.
                                                                //     93  
                                                                //     94     New Lines (2)
_imp_NEWLINES(2);
                                                                //     95  
                                                                //     96     Print String ("Test INTEGER MULTIPLICATION.");   New Line
_imp_PRINTSTRING(_imp_str_literal("Test INTEGER MULTIPLICATION."));
_imp_NEWLINE();
                                                                //     97     Print String ("----------------------------");   New Line
_imp_PRINTSTRING(_imp_str_literal("----------------------------"));
_imp_NEWLINE();
                                                                //     98  
                                                                //     99  
                                                                //    100     J = 50
J = 50;
                                                                //    101     K = 10
K = 10;
                                                                //    102  
                                                                //    103     J = J * 10       { J = 500
J = (((int)(J)) * (10));
                                                                //    104     %If J = 500 %then pass %else fail
if (((J) != (500))) goto L_0008;
PASS();
goto L_0009;
L_0008:;
FAIL();
L_0009:;
                                                                //    105  
                                                                //    106     J = 10 * J       { J = 5000
J = (((int)(10)) * (J));
                                                                //    107     %If J = 5000 %then pass %else fail
if (((J) != (5000))) goto L_000a;
PASS();
goto L_000b;
L_000a:;
FAIL();
L_000b:;
                                                                //    108  
                                                                //    109     J = 5
J = 5;
                                                                //    110  
                                                                //    111     J = J * CInt3    { J = 50
J = (((int)(J)) * (10));
                                                                //    112     %If J = 50 %then pass %else fail
if (((J) != (50))) goto L_000c;
PASS();
goto L_000d;
L_000c:;
FAIL();
L_000d:;
                                                                //    113  
                                                                //    114     J = CInt3 * J    { J = 500
J = (((int)(10)) * (J));
                                                                //    115     %If J = 500 %then pass %else fail
if (((J) != (500))) goto L_000e;
PASS();
goto L_000f;
L_000e:;
FAIL();
L_000f:;
                                                                //    116  
                                                                //    117     J = J * K       { J = 5000
J = (((int)(J)) * (K));
                                                                //    118     %If J = 5000 %then pass %else fail
if (((J) != (5000))) goto L_0010;
PASS();
goto L_0011;
L_0010:;
FAIL();
L_0011:;
                                                                //    119  
                                                                //    120     J = K * J        { J = 50000
J = (((int)(K)) * (J));
                                                                //    121     %If J = 50000 %then pass %else fail
if (((J) != (50000))) goto L_0012;
PASS();
goto L_0013;
L_0012:;
FAIL();
L_0013:;
                                                                //    122  
                                                                //    123     
                                                                //    124     !*  Test that assignment after evaluation still works when the
                                                                //    125     !*  destination variable does not appear in the expression.
                                                                //    126  
                                                                //    127     J = 5
J = 5;
                                                                //    128  
                                                                //    129     M = J * K    
M = (((int)(J)) * (K));
                                                                //    130     %If M = 50 %then pass %else fail
if (((M) != (50))) goto L_0014;
PASS();
goto L_0015;
L_0014:;
FAIL();
L_0015:;
                                                                //    131  
                                                                //    132     
                                                                //    133     !*  Now test the values of the two main variables: J and K
                                                                //    134  
                                                                //    135     %If J = 5 %and K = 10 %then pass %else fail
if (((J) != (5))) goto L_0016;
if (((K) != (10))) goto L_0016;
PASS();
goto L_0017;
L_0016:;
FAIL();
L_0017:;
                                                                //    136  
                                                                //    137  
                                                                //    138  
                                                                //    139  
                                                                //    140  
                                                                //    141     !*    INTEGER EXPONENTIATION
                                                                //    142  
                                                                //    143     New Lines (2)
_imp_NEWLINES(2);
                                                                //    144  
                                                                //    145     Print String ("Test INTEGER EXPONENTIATION.");  New Line
_imp_PRINTSTRING(_imp_str_literal("Test INTEGER EXPONENTIATION."));
_imp_NEWLINE();
                                                                //    146     Print String ("----------------------------");  New Line
_imp_PRINTSTRING(_imp_str_literal("----------------------------"));
_imp_NEWLINE();
                                                                //    147  
                                                                //    148     K = 3
K = 3;
                                                                //    149     M = 5
M = 5;
                                                                //    150  
                                                                //    151     J = K ^^ 0
J = _imp_IEXP(K, 0);
                                                                //    152     %If J = 1 %then pass %else fail
if (((J) != (1))) goto L_0018;
PASS();
goto L_0019;
L_0018:;
FAIL();
L_0019:;
                                                                //    153  
                                                                //    154     J = K ^^ M
J = _imp_IEXP(K, M);
                                                                //    155     %If J = 243 %then pass %else fail
if (((J) != (243))) goto L_001a;
PASS();
goto L_001b;
L_001a:;
FAIL();
L_001b:;
                                                                //    156  
                                                                //    157     J = K ^^ CInt4
J = _imp_IEXP(K, 3);
                                                                //    158     %If J = 27 %then pass %else fail
if (((J) != (27))) goto L_001c;
PASS();
goto L_001d;
L_001c:;
FAIL();
L_001d:;
                                                                //    159  
                                                                //    160     J = 3 ^^ 0
J = _imp_IEXP(3, 0);
                                                                //    161     %If J = 1 %then pass %else fail
if (((J) != (1))) goto L_001e;
PASS();
goto L_001f;
L_001e:;
FAIL();
L_001f:;
                                                                //    162  
                                                                //    163     J = 3 ^^ M
J = _imp_IEXP(3, M);
                                                                //    164     %If J = 243 %then pass %else fail
if (((J) != (243))) goto L_0020;
PASS();
goto L_0021;
L_0020:;
FAIL();
L_0021:;
                                                                //    165  
                                                                //    166     J = 3 ^^ CInt4
J = _imp_IEXP(3, 3);
                                                                //    167     %If J = 27 %then pass %else fail
if (((J) != (27))) goto L_0022;
PASS();
goto L_0023;
L_0022:;
FAIL();
L_0023:;
                                                                //    168  
                                                                //    169     J = CInt4 ^^ 0
J = _imp_IEXP(3, 0);
                                                                //    170     %If J = 1 %then pass %else fail
if (((J) != (1))) goto L_0024;
PASS();
goto L_0025;
L_0024:;
FAIL();
L_0025:;
                                                                //    171  
                                                                //    172     J = CInt4 ^^ M
J = _imp_IEXP(3, M);
                                                                //    173     %If J = 243 %then pass %else fail
if (((J) != (243))) goto L_0026;
PASS();
goto L_0027;
L_0026:;
FAIL();
L_0027:;
                                                                //    174  
                                                                //    175     J = CInt3 ^^ CInt4
J = _imp_IEXP(10, 3);
                                                                //    176     %If J = 1000 %then pass %else fail
if (((J) != (1000))) goto L_0028;
PASS();
goto L_0029;
L_0028:;
FAIL();
L_0029:;
                                                                //    177     
                                                                //    178  
                                                                //    179     New Line
_imp_NEWLINE();
                                                                //    180     Print String ("Let:  J = 3  before every test with J as argument."); New Line
_imp_PRINTSTRING(_imp_str_literal("Let:  J = 3  before every test with J as argument."));
_imp_NEWLINE();
                                                                //    181     Print String ("---") ; New Line
_imp_PRINTSTRING(_imp_str_literal("---"));
_imp_NEWLINE();
                                                                //    182  
                                                                //    183     J = 3
J = 3;
                                                                //    184     J = J ^^ 0
J = _imp_IEXP(J, 0);
                                                                //    185     %If J = 1 %then pass %else fail
if (((J) != (1))) goto L_002a;
PASS();
goto L_002b;
L_002a:;
FAIL();
L_002b:;
                                                                //    186  
                                                                //    187     J = 3
J = 3;
                                                                //    188     J = J ^^ M
J = _imp_IEXP(J, M);
                                                                //    189     %If J = 243 %then pass %else fail
if (((J) != (243))) goto L_002c;
PASS();
goto L_002d;
L_002c:;
FAIL();
L_002d:;
                                                                //    190  
                                                                //    191     J = 3
J = 3;
                                                                //    192     J = J ^^ Cint4
J = _imp_IEXP(J, 3);
                                                                //    193     %If J = 27 %then pass %else fail
if (((J) != (27))) goto L_002e;
PASS();
goto L_002f;
L_002e:;
FAIL();
L_002f:;
                                                                //    194  
                                                                //    195     J = 3
J = 3;
                                                                //    196     J = J ^^ J
J = _imp_IEXP(J, J);
                                                                //    197     %If J = 27 %then pass %else fail
if (((J) != (27))) goto L_0030;
PASS();
goto L_0031;
L_0030:;
FAIL();
L_0031:;
                                                                //    198  
                                                                //    199     J = M ^^ M
J = _imp_IEXP(M, M);
                                                                //    200     %If J = 3125 %then pass %else fail
if (((J) != (3125))) goto L_0032;
PASS();
goto L_0033;
L_0032:;
FAIL();
L_0033:;
                                                                //    201  
                                                                //    202   
                                                                //    203   
                                                                //    204  
                                                                //    205     !*    INTEGER Division
                                                                //    206  
                                                                //    207     New Lines (2)
_imp_NEWLINES(2);
                                                                //    208  
                                                                //    209     Print String ("Test INTEGER Division.");  New Line
_imp_PRINTSTRING(_imp_str_literal("Test INTEGER Division."));
_imp_NEWLINE();
                                                                //    210     Print String ("----------------------");  New Line
_imp_PRINTSTRING(_imp_str_literal("----------------------"));
_imp_NEWLINE();
                                                                //    211  
                                                                //    212     K = 30
K = 30;
                                                                //    213     M = 5
M = 5;
                                                                //    214  
                                                                //    215     
                                                                //    216     J = K // M
J = (long)((long)((int)(K)) / (long)((int)(_Z(M))));
                                                                //    217     %If J = 6 %then pass %else fail
if (((J) != (6))) goto L_0034;
PASS();
goto L_0035;
L_0034:;
FAIL();
L_0035:;
                                                                //    218  
                                                                //    219     J = K // CInt4
J = (long)((long)((int)(K)) / (long)((int)(3)));
                                                                //    220     %If J = 10 %then pass %else fail
if (((J) != (10))) goto L_0036;
PASS();
goto L_0037;
L_0036:;
FAIL();
L_0037:;
                                                                //    221  
                                                                //    222     J = 30 // M
J = (long)((long)((int)(30)) / (long)((int)(_Z(M))));
                                                                //    223     %If J = 6 %then pass %else fail
if (((J) != (6))) goto L_0038;
PASS();
goto L_0039;
L_0038:;
FAIL();
L_0039:;
                                                                //    224  
                                                                //    225     J = 30 // CInt4
J = (long)((long)((int)(30)) / (long)((int)(3)));
                                                                //    226     %If J = 10 %then pass %else fail
if (((J) != (10))) goto L_003a;
PASS();
goto L_003b;
L_003a:;
FAIL();
L_003b:;
                                                                //    227  
                                                                //    228     J = CInt3 // M
J = (long)((long)((int)(10)) / (long)((int)(_Z(M))));
                                                                //    229     %If J = 2 %then pass %else fail
if (((J) != (2))) goto L_003c;
PASS();
goto L_003d;
L_003c:;
FAIL();
L_003d:;
                                                                //    230  
                                                                //    231     J = CInt3 // CInt4
J = (long)((long)((int)(10)) / (long)((int)(3)));
                                                                //    232     %If J = 3 %then pass %else fail
if (((J) != (3))) goto L_003e;
PASS();
goto L_003f;
L_003e:;
FAIL();
L_003f:;
                                                                //    233     
                                                                //    234     New Line
_imp_NEWLINE();
                                                                //    235     Print String ("Let:  J = 30  before every test with J as argument."); New Line
_imp_PRINTSTRING(_imp_str_literal("Let:  J = 30  before every test with J as argument."));
_imp_NEWLINE();
                                                                //    236     Print String ("---")
_imp_PRINTSTRING(_imp_str_literal("---"));
                                                                //    237     New Line
_imp_NEWLINE();
                                                                //    238  
                                                                //    239     J = 30
J = 30;
                                                                //    240     J = J // M
J = (long)((long)((int)(J)) / (long)((int)(_Z(M))));
                                                                //    241     %If J = 6 %then pass %else fail
if (((J) != (6))) goto L_0040;
PASS();
goto L_0041;
L_0040:;
FAIL();
L_0041:;
                                                                //    242  
                                                                //    243     J = 30
J = 30;
                                                                //    244     J = J // Cint4
J = (long)((long)((int)(J)) / (long)((int)(3)));
                                                                //    245     %If J = 10 %then pass %else fail
if (((J) != (10))) goto L_0042;
PASS();
goto L_0043;
L_0042:;
FAIL();
L_0043:;
                                                                //    246  
                                                                //    247     J = 30
J = 30;
                                                                //    248     J = J // J
J = (long)((long)((int)(J)) / (long)((int)(_Z(J))));
                                                                //    249     %If J = 1 %then pass %else fail
if (((J) != (1))) goto L_0044;
PASS();
goto L_0045;
L_0044:;
FAIL();
L_0045:;
                                                                //    250  
                                                                //    251     J = M // M
J = (long)((long)((int)(M)) / (long)((int)(_Z(M))));
                                                                //    252     %If J = 1 %then pass %else fail
if (((J) != (1))) goto L_0046;
PASS();
goto L_0047;
L_0046:;
FAIL();
L_0047:;
                                                                //    253  
                                                                //    254  
                                                                //    255  
                                                                //    256  
                                                                //    257     New Lines (2)
_imp_NEWLINES(2);
                                                                //    258  
                                                                //    259     Print String ("Test the Modulus Operator");  New Line
_imp_PRINTSTRING(_imp_str_literal("Test the Modulus Operator"));
_imp_NEWLINE();
                                                                //    260     Print String ("-------------------------");  New Line
_imp_PRINTSTRING(_imp_str_literal("-------------------------"));
_imp_NEWLINE();
                                                                //    261     
                                                                //    262     K = 0
K = 0;
                                                                //    263     M = -3
M = (-3);
                                                                //    264     P = 3
P = 3;
                                                                //    265  
                                                                //    266     J = |-3|
J = _imp_IMOD((-3));
                                                                //    267     Q = |3|
Q = _imp_IMOD(3);
                                                                //    268     %if J = 3 %then pass %else fail
if (((J) != (3))) goto L_0048;
PASS();
goto L_0049;
L_0048:;
FAIL();
L_0049:;
                                                                //    269     %if Q = 3 %then pass %else fail
if (((Q) != (3))) goto L_004a;
PASS();
goto L_004b;
L_004a:;
FAIL();
L_004b:;
                                                                //    270     
                                                                //    271     J = |CInt4|
J = _imp_IMOD(3);
                                                                //    272     %if J = 3 %then pass %else fail
if (((J) != (3))) goto L_004c;
PASS();
goto L_004d;
L_004c:;
FAIL();
L_004d:;
                                                                //    273  
                                                                //    274     J = |K|
J = _imp_IMOD(K);
                                                                //    275     %if J = 0 %then pass %else fail
if (((J) != (0))) goto L_004e;
PASS();
goto L_004f;
L_004e:;
FAIL();
L_004f:;
                                                                //    276  
                                                                //    277     J = |M|
J = _imp_IMOD(M);
                                                                //    278     %if J = 3 %then pass %else fail
if (((J) != (3))) goto L_0050;
PASS();
goto L_0051;
L_0050:;
FAIL();
L_0051:;
                                                                //    279  
                                                                //    280     J = |P|
J = _imp_IMOD(P);
                                                                //    281     %if J = 3 %then pass %else fail
if (((J) != (3))) goto L_0052;
PASS();
goto L_0053;
L_0052:;
FAIL();
L_0053:;
                                                                //    282  
                                                                //    283     P = |P|
P = _imp_IMOD(P);
                                                                //    284     %if P = 3 %then pass %else fail
if (((P) != (3))) goto L_0054;
PASS();
goto L_0055;
L_0054:;
FAIL();
L_0055:;
                                                                //    285  
                                                                //    286     J = |F|
J = _imp_IMOD(F());
                                                                //    287     %if J = 3 %then pass %else fail
if (((J) != (3))) goto L_0056;
PASS();
goto L_0057;
L_0056:;
FAIL();
L_0057:;
                                                                //    288  
                                                                //    289     J = |(|M|)|
J = _imp_MOD(_imp_IMOD(M));
                                                                //    290     %if J = 3 %then pass %else fail
if (((J) != (3))) goto L_0058;
PASS();
goto L_0059;
L_0058:;
FAIL();
L_0059:;
                                                                //    291  
                                                                //    292     J = |(-P) + K - (|F * M|)|
J = _imp_MOD(((((((-(P))) + (K)))) - (_imp_IMOD((((int)(F())) * (M))))));
                                                                //    293     %if J = 12 %then pass %else fail
if (((J) != (12))) goto L_005a;
PASS();
goto L_005b;
L_005a:;
FAIL();
L_005b:;
                                                                //    294  
                                                                //    295     
                                                                //    296     
                                                                //    297  
                                                                //    298     New Lines (2)
_imp_NEWLINES(2);
                                                                //    299  
                                                                //    300     Print String ("Test the REM Function.");   New Line
_imp_PRINTSTRING(_imp_str_literal("Test the REM Function."));
_imp_NEWLINE();
                                                                //    301     Print String ("----------------------");   New Line
_imp_PRINTSTRING(_imp_str_literal("----------------------"));
_imp_NEWLINE();
                                                                //    302  
                                                                //    303     %If REM (0, 1) = REM (0, -1) = 0  %then pass %else fail
if (({int tmp1 = _imp_REM(0, 1), tmp2 = _imp_REM(0, (-1)), tmp3 = 0; (tmp1 != tmp2) || (tmp2 != tmp3);})) goto L_005c;
PASS();
goto L_005d;
L_005c:;
FAIL();
L_005d:;
                                                                //    304     %If REM (100, 10) = 0  %then pass %else fail
if (((_imp_REM(100, 10)) != (0))) goto L_005e;
PASS();
goto L_005f;
L_005e:;
FAIL();
L_005f:;
                                                                //    305     %If REM (-100, 10) = 0 %then pass %else fail
if (((_imp_REM((-100), 10)) != (0))) goto L_0060;
PASS();
goto L_0061;
L_0060:;
FAIL();
L_0061:;
                                                                //    306     %If REM (5, 3) = 2 %then pass %else fail
if (((_imp_REM(5, 3)) != (2))) goto L_0062;
PASS();
goto L_0063;
L_0062:;
FAIL();
L_0063:;
                                                                //    307     %If REM (-5, 3) = -2 %then pass %else fail
if (((_imp_REM((-5), 3)) != ((-2)))) goto L_0064;
PASS();
goto L_0065;
L_0064:;
FAIL();
L_0065:;
                                                                //    308     %If REM (-5, -3) = -2 %then pass %else fail
if (((_imp_REM((-5), (-3))) != ((-2)))) goto L_0066;
PASS();
goto L_0067;
L_0066:;
FAIL();
L_0067:;
                                                                //    309  
                                                                //    310  
                                                                //    311  select output(1)
_imp_SELECTOUTPUT(1);
                                                                //    312  write(failures,1);  printstring(" failure(s)");  newline
_imp_WRITE(FAILURES, 1);
_imp_PRINTSTRING(_imp_str_literal(" failure(s)"));
_imp_NEWLINE();
                                                                //    313  
                                                                //    314  %End %of %Program
/* Remove %on %event handler here if present for this block */
return 0;
} // End of block _imp_main at level 1
// End of file
