#include <perms.h>

                                                                //      1  
                                                                //      2  !*   Title      :  XII 
                                                                //      3  !*   Version    :  I
                                                                //      4  !*   Date       :  29 June 1984
                                                                //      5  !*   Description:  Tests the ability to raise events within a program
                                                                //      6  !*                 both in the standard procedures etc and by the user.
                                                                //      7  
                                                                //      8  
                                                                //      9  %Begin
#line 9 "regression-compile-tmp/EVENTS.imp"
int main(int argc, char **argv) {
  _imp_initialise(argc, argv);
                                                                //     10     %Switch   Trap (0 : 15)
#line 10 "regression-compile-tmp/EVENTS.imp"
static int sw1_TRAP_idx;
static const void * /*SWITCH*/ sw1_TRAP[16] = { &&sw1_TRAP_0, &&sw1_TRAP_1, &&sw1_TRAP_2, &&sw1_TRAP_3, &&sw1_TRAP_4, &&sw1_TRAP_5, &&sw1_TRAP_6, &&sw1_TRAP_7, &&sw1_TRAP_8, &&sw1_TRAP_9, &&sw1_TRAP_10, &&sw1_TRAP_11, &&sw1_TRAP_12, &&sw1_TRAP_13, &&sw1_TRAP_14, &&sw1_TRAP_15,  };
                                                                //     11     %Integer  Sub
#line 11 "regression-compile-tmp/EVENTS.imp"
int SUB;
                                                                //     12  
                                                                //     13  %owninteger failures=0
#line 13 "regression-compile-tmp/EVENTS.imp"
static int FAILURES = 0;
                                                                //     14  
                                                                //     15  %routine pass
#line 15 "regression-compile-tmp/EVENTS.imp"
void PASS( void )
#line 15 "regression-compile-tmp/EVENTS.imp"
{
                                                                //     16    printstring("Pass: ")
#line 16 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("Pass: "));
                                                                //     17  %end
#line 17 "regression-compile-tmp/EVENTS.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block PASS at level 2
                                                                //     18  %routine fail
#line 18 "regression-compile-tmp/EVENTS.imp"
void FAIL( void )
#line 18 "regression-compile-tmp/EVENTS.imp"
{
                                                                //     19    printstring("FAIL: ")
#line 19 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("FAIL: "));
                                                                //     20    failures = failures+1
#line 20 "regression-compile-tmp/EVENTS.imp"
FAILURES = (((int)(FAILURES)) + (1));
                                                                //     21  %end
#line 21 "regression-compile-tmp/EVENTS.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block FAIL at level 2
                                                                //     22  
                                                                //     23     %On %Event 0, 10, 13, 15 %Start
#line 23 "regression-compile-tmp/EVENTS.imp"
if (!_imp_on_event(0, 10, 13, 15)) goto L_0002;  /* TO DO: Remove %on %event handler just before L_0002: if present for this block */
                                                                //     24  
                                                                //     25         Sub = Event_Sub {Event}
#line 25 "regression-compile-tmp/EVENTS.imp"
SUB = _imp_EVENT().SUB;
                                                                //     26         -> Trap (Event_Event)
#line 26 "regression-compile-tmp/EVENTS.imp"
sw1_TRAP_idx = _imp_EVENT().EVENT; if ((0 <= sw1_TRAP_idx) && (sw1_TRAP_idx <= 15)) goto *sw1_TRAP[sw1_TRAP_idx]; else {
   /*_imp_signal(8, 2, sw1_TRAP_idx);*/
   fprintf(stderr, "%%SWITCH index TRAP(%d) not in range 0:15 at %s:%d\n",
           sw1_TRAP_idx, (_imp_current_file != 0 ? _imp_current_file : __FILE__),
           (_imp_current_line != 0 ? _imp_current_line : __LINE__));
           exit(1);
}
                                                                //     27   
                                                                //     28         Trap(10):     { Trap an event raised inside a %On block
#line 28 "regression-compile-tmp/EVENTS.imp"
sw1_TRAP_10:;
                                                                //     29                       { Raised inside local routine 'Eventful'.
                                                                //     30   
                                                                //     31         %If Sub = 116 %c
#line 31 "regression-compile-tmp/EVENTS.imp"
if (((SUB) != (116))) goto L_0003;
#line 31 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("Trapped an event inside an %ON block"));
#line 31 "regression-compile-tmp/EVENTS.imp"
goto L_0004;
#line 31 "regression-compile-tmp/EVENTS.imp"
L_0003:;
#line 31 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("Error in _Sub Event field for event 10"));
#line 31 "regression-compile-tmp/EVENTS.imp"
L_0004:;
                                                                //     32             %then Print String ("Trapped an event inside an %ON block")  %c
                                                                //     33             %else Print String ("Error in _Sub Event field for event 10")
                                                                //     34         New Line
#line 34 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //     35         -> Resume2
#line 35 "regression-compile-tmp/EVENTS.imp"
goto U_1000;
                                                                //     36  
                                                                //     37         Trap(15):     { Trapping events inside routines.
#line 37 "regression-compile-tmp/EVENTS.imp"
sw1_TRAP_15:;
                                                                //     38   
                                                                //     39         Print String ("Trapped event inside a ")
#line 39 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("Trapped event inside a "));
                                                                //     40         %If Sub = 115 %then %Start
#line 40 "regression-compile-tmp/EVENTS.imp"
if (((SUB) != (115))) goto L_0005;
                                                                //     41             Print String ("local routine.")
#line 41 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("local routine."));
                                                                //     42             New Line
#line 42 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //     43             %If Event_Info{Extra} = 20 %then pass %else fail
#line 43 "regression-compile-tmp/EVENTS.imp"
if (((_imp_EVENT().INFO) != (20))) goto L_0006;
#line 43 "regression-compile-tmp/EVENTS.imp"
PASS();
#line 43 "regression-compile-tmp/EVENTS.imp"
goto L_0007;
#line 43 "regression-compile-tmp/EVENTS.imp"
L_0006:;
#line 43 "regression-compile-tmp/EVENTS.imp"
FAIL();
#line 43 "regression-compile-tmp/EVENTS.imp"
L_0007:;
                                                                //     44             Print String ("Event_Extra field correctly assigned.")
#line 44 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("Event_Extra field correctly assigned."));
                                                                //     45             New Line
#line 45 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //     46             -> Resume3
#line 46 "regression-compile-tmp/EVENTS.imp"
goto U_1001;
                                                                //     47         %Finish %else %if Sub = 118 %then %start
#line 47 "regression-compile-tmp/EVENTS.imp"
L_0005:;
#line 47 "regression-compile-tmp/EVENTS.imp"
if (((SUB) != (118))) goto L_0008;
                                                                //     48             Print String ("nested, deeply recursed routine.")
#line 48 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("nested, deeply recursed routine."));
                                                                //     49             New Line
#line 49 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //     50             -> Resume4
#line 50 "regression-compile-tmp/EVENTS.imp"
goto U_1002;
                                                                //     51         %Finish
#line 51 "regression-compile-tmp/EVENTS.imp"
L_0008:;
                                                                //     52  
                                                                //     53         TRAP(*):
#line 53 "regression-compile-tmp/EVENTS.imp"
sw1_TRAP_default:;
                                                                //     54            Print String("FAIL: Unexpected event")
#line 54 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("FAIL: Unexpected event"));
                                                                //     55            write(event_event,1);  newline
#line 55 "regression-compile-tmp/EVENTS.imp"
_imp_WRITE(_imp_EVENT().EVENT, 1);
#line 55 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //     56            %stop
#line 56 "regression-compile-tmp/EVENTS.imp"
exit(0);
                                                                //     57      %Finish
#line 57 "regression-compile-tmp/EVENTS.imp"
L_0002:;
                                                                //     58  
                                                                //     59  
                                                                //     60     %Routine  Test Standard Events
#line 60 "regression-compile-tmp/EVENTS.imp"
void TESTSTANDARDEVENTS( void )
#line 60 "regression-compile-tmp/EVENTS.imp"
{
                                                                //     61  
                                                                //     62         !*  This routine forces the standard events to be raised to
                                                                //     63         !*  test their validity.
                                                                //     64  
                                                                //     65         %Label   Catch
#line 65 "regression-compile-tmp/EVENTS.imp"
__label__ U_1003;
                                                                //     66  
                                                                //     67         %Integer J
#line 67 "regression-compile-tmp/EVENTS.imp"
int J;
                                                                //     68         %Integer K
#line 68 "regression-compile-tmp/EVENTS.imp"
int K;
                                                                //     69         %Integer C
#line 69 "regression-compile-tmp/EVENTS.imp"
int C;
                                                                //     70         %Integer A
#line 70 "regression-compile-tmp/EVENTS.imp"
int A;
                                                                //     71  
                                                                //     72         %Integer Start = 0
#line 72 "regression-compile-tmp/EVENTS.imp"
int START;
#line 72 "regression-compile-tmp/EVENTS.imp"
START = 0;
                                                                //     73   
                                                                //     74         %Integer Zero = 0
#line 74 "regression-compile-tmp/EVENTS.imp"
int ZERO;
#line 74 "regression-compile-tmp/EVENTS.imp"
ZERO = 0;
                                                                //     75         %Integer Minus = -1
#line 75 "regression-compile-tmp/EVENTS.imp"
int MINUS;
#line 75 "regression-compile-tmp/EVENTS.imp"
MINUS = (-1);
                                                                //     76         %Integer Unassigned
#line 76 "regression-compile-tmp/EVENTS.imp"
int UNASSIGNED;
                                                                //     77  
                                                                //     78         %String(255) S, T
#line 78 "regression-compile-tmp/EVENTS.imp"
_imp_string /*%string(255)*/ S;
#line 78 "regression-compile-tmp/EVENTS.imp"
_imp_string /*%string(255)*/ T;
                                                                //     79  
                                                                //     80         %Switch  EN (0 : 100)    { Event Number = Event * 10 + Sub
#line 80 "regression-compile-tmp/EVENTS.imp"
static int sw2_EN_idx;
static const void * /*SWITCH*/ sw2_EN[101] = { &&sw2_EN_0, &&sw2_EN_1, &&sw2_EN_2, &&sw2_EN_3, &&sw2_EN_4, &&sw2_EN_5, &&sw2_EN_6, &&sw2_EN_7, &&sw2_EN_8, &&sw2_EN_9, &&sw2_EN_10, &&sw2_EN_11, &&sw2_EN_12, &&sw2_EN_13, &&sw2_EN_14, &&sw2_EN_15, &&sw2_EN_16, &&sw2_EN_17, &&sw2_EN_18, &&sw2_EN_19, &&sw2_EN_20, &&sw2_EN_21, &&sw2_EN_22, &&sw2_EN_23, &&sw2_EN_24, &&sw2_EN_25, &&sw2_EN_26, &&sw2_EN_27, &&sw2_EN_28, &&sw2_EN_29, &&sw2_EN_30, &&sw2_EN_31, &&sw2_EN_32, &&sw2_EN_33, &&sw2_EN_34, &&sw2_EN_35, &&sw2_EN_36, &&sw2_EN_37, &&sw2_EN_38, &&sw2_EN_39, &&sw2_EN_40, &&sw2_EN_41, &&sw2_EN_42, &&sw2_EN_43, &&sw2_EN_44, &&sw2_EN_45, &&sw2_EN_46, &&sw2_EN_47, &&sw2_EN_48, &&sw2_EN_49, &&sw2_EN_50, &&sw2_EN_51, &&sw2_EN_52, &&sw2_EN_53, &&sw2_EN_54, &&sw2_EN_55, &&sw2_EN_56, &&sw2_EN_57, &&sw2_EN_58, &&sw2_EN_59, &&sw2_EN_60, &&sw2_EN_61, &&sw2_EN_62, &&sw2_EN_63, &&sw2_EN_64, &&sw2_EN_65, &&sw2_EN_66, &&sw2_EN_67, &&sw2_EN_68, &&sw2_EN_69, &&sw2_EN_70, &&sw2_EN_71, &&sw2_EN_72, &&sw2_EN_73, &&sw2_EN_74, &&sw2_EN_75, &&sw2_EN_76, &&sw2_EN_77, &&sw2_EN_78, &&sw2_EN_79, &&sw2_EN_80, &&sw2_EN_81, &&sw2_EN_82, &&sw2_EN_83, &&sw2_EN_84, &&sw2_EN_85, &&sw2_EN_86, &&sw2_EN_87, &&sw2_EN_88, &&sw2_EN_89, &&sw2_EN_90, &&sw2_EN_91, &&sw2_EN_92, &&sw2_EN_93, &&sw2_EN_94, &&sw2_EN_95, &&sw2_EN_96, &&sw2_EN_97, &&sw2_EN_98, &&sw2_EN_99, &&sw2_EN_100,  };
                                                                //     81  
                                                                //     82  
                                                                //     83         %On %Event 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10  %Start
#line 83 "regression-compile-tmp/EVENTS.imp"
if (!_imp_on_event(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) goto L_0009;  /* TO DO: Remove %on %event handler just before L_0009: if present for this block */
                                                                //     84  
                                                                //     85             Select Output ({1}0) %if K = 90   { Revert back to old stream.
#line 85 "regression-compile-tmp/EVENTS.imp"
if (((K) != (90))) goto L_000a;
#line 85 "regression-compile-tmp/EVENTS.imp"
_imp_SELECTOUTPUT(0);
#line 85 "regression-compile-tmp/EVENTS.imp"
L_000a:;
                                                                //     86  
                                                                //     87             %If Event_Event = K // 10 %and Event_Sub {Event} = Rem (K, 10) %Start
#line 87 "regression-compile-tmp/EVENTS.imp"
if (((_imp_EVENT().EVENT) != (((long)((long)((int)(K)) / (long)((int)(10))))))) goto L_000b;
#line 87 "regression-compile-tmp/EVENTS.imp"
if (((_imp_EVENT().SUB) != (_imp_REM(K, 10)))) goto L_000b;
                                                                //     88                Print String ("Successfully trapped:  Event =")
#line 88 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("Successfully trapped:  Event ="));
                                                                //     89                Write (K // 10, 1)
#line 89 "regression-compile-tmp/EVENTS.imp"
_imp_WRITE(((long)((long)((int)(K)) / (long)((int)(10)))), 1);
                                                                //     90                Print String ("   Sub =")
#line 90 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("   Sub ="));
                                                                //     91                Write (Rem (K, 10), 1)
#line 91 "regression-compile-tmp/EVENTS.imp"
_imp_WRITE(_imp_REM(K, 10), 1);
                                                                //     92                New Line
#line 92 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //     93             %finish %else %start
#line 93 "regression-compile-tmp/EVENTS.imp"
goto L_000c;
#line 93 "regression-compile-tmp/EVENTS.imp"
L_000b:;
                                                                //     94                Print String ("Should have trapped:  Event =")
#line 94 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("Should have trapped:  Event ="));
                                                                //     95                Write (K // 10, 1)
#line 95 "regression-compile-tmp/EVENTS.imp"
_imp_WRITE(((long)((long)((int)(K)) / (long)((int)(10)))), 1);
                                                                //     96                Print String ("   Sub =")
#line 96 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("   Sub ="));
                                                                //     97                Write (Rem (K, 10), 1)
#line 97 "regression-compile-tmp/EVENTS.imp"
_imp_WRITE(_imp_REM(K, 10), 1);
                                                                //     98                New Line
#line 98 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //     99                Print String ("Instead trapped:  Event =")
#line 99 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("Instead trapped:  Event ="));
                                                                //    100                Write (Event_Event, 1)
#line 100 "regression-compile-tmp/EVENTS.imp"
_imp_WRITE(_imp_EVENT().EVENT, 1);
                                                                //    101                Print String ("   Sub =")
#line 101 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("   Sub ="));
                                                                //    102                Write (Event_Sub {Event}, 1)
#line 102 "regression-compile-tmp/EVENTS.imp"
_imp_WRITE(_imp_EVENT().SUB, 1);
                                                                //    103                New Line
#line 103 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //    104            %Finish
#line 104 "regression-compile-tmp/EVENTS.imp"
L_000c:;
                                                                //    105            Start = K + 1
#line 105 "regression-compile-tmp/EVENTS.imp"
START = (((int)(K)) + (1));
                                                                //    106  
                                                                //    107         %Finish
#line 107 "regression-compile-tmp/EVENTS.imp"
L_0009:;
                                                                //    108  
                                                                //    109  
                                                                //    110          %For K = Start, 1, 100 %cycle
#line 110 "regression-compile-tmp/EVENTS.imp"
K = (((int)(START)) - (1));
if ((((100)-(START)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle K = START, 1, 100");
L_000d:;
if (K == 100) goto L_000e;
K += 1;
                                                                //    111          
                                                                //    112  write(k,1);newline
#line 112 "regression-compile-tmp/EVENTS.imp"
_imp_WRITE(K, 1);
#line 112 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //    113             -> EN(K)
#line 113 "regression-compile-tmp/EVENTS.imp"
sw2_EN_idx = K; if ((0 <= sw2_EN_idx) && (sw2_EN_idx <= 100)) goto *sw2_EN[sw2_EN_idx]; else {
   /*_imp_signal(8, 2, sw2_EN_idx);*/
   fprintf(stderr, "%%SWITCH index EN(%d) not in range 0:100 at %s:%d\n",
           sw2_EN_idx, (_imp_current_file != 0 ? _imp_current_file : __FILE__),
           (_imp_current_line != 0 ? _imp_current_line : __LINE__));
           exit(1);
}
                                                                //    114  
                                                                //    115        
                                                                //    116             EN(0):   { Normal Termination by the %STOP Instruction.
#line 116 "regression-compile-tmp/EVENTS.imp"
sw2_EN_0:;
                                                                //    117  
                                                                //    118                      %Stop
#line 118 "regression-compile-tmp/EVENTS.imp"
exit(0);
                                                                //    119                      -> Catch
#line 119 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    120  
                                                                //    121  
                                                                //    122  
                                                                //    123             EN(11):  { Integer Overflow
#line 123 "regression-compile-tmp/EVENTS.imp"
sw2_EN_11:;
                                                                //    124  
                                                                //    125                      J = 2147483600       { Two to the power of 32.
#line 125 "regression-compile-tmp/EVENTS.imp"
J = 2147483600;
                                                                //    126                      C = J * 3
#line 126 "regression-compile-tmp/EVENTS.imp"
C = (((int)(J)) * (3));
                                                                //    127                      -> Catch
#line 127 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    128  
                                                                //    129  
                                                                //    130  
                                                                //    131             EN(13):  { String Overflow.
#line 131 "regression-compile-tmp/EVENTS.imp"
sw2_EN_13:;
                                                                //    132  
                                                                //    133                      S = "1234567890"
#line 133 "regression-compile-tmp/EVENTS.imp"
S = _imp_str_literal("1234567890");
                                                                //    134                      T = ""
#line 134 "regression-compile-tmp/EVENTS.imp"
T = _imp_str_literal("");
                                                                //    135                      T = T . S  %for J = 1, 1, 30
#line 135 "regression-compile-tmp/EVENTS.imp"
J = 0;
if ((((30)-(1)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle J = 1, 1, 30");
L_0010:;
if (J == 30) goto L_0011;
J += 1;
#line 135 "regression-compile-tmp/EVENTS.imp"
T = _imp_join((_imp_string)T,(_imp_string)S);
#line 135 "regression-compile-tmp/EVENTS.imp"
goto L_0010;
#line 135 "regression-compile-tmp/EVENTS.imp"
L_0011:;
                                                                //    136                      -> Catch
#line 136 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    137  
                                                                //    138  
                                                                //    139             EN(14):  { Division by zero.
#line 139 "regression-compile-tmp/EVENTS.imp"
sw2_EN_14:;
                                                                //    140  
                                                                //    141                      J = Minus // Zero
#line 141 "regression-compile-tmp/EVENTS.imp"
J = (long)((long)((int)(MINUS)) / (long)((int)(_Z(ZERO))));
                                                                //    142                      -> Catch
#line 142 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    143  
                                                                //    144  
                                                                //    145   
                                                                //    146          EN(21):  { Store Space Exhausted
#line 146 "regression-compile-tmp/EVENTS.imp"
sw2_EN_21:;
                                                                //    147  
                                                                //    148                   %Begin
#line 148 "regression-compile-tmp/EVENTS.imp"
void _BLOCK_1_LEVEL_2_(void) {
                                                                //    149                      %Integer %Array Temp (1 : 10000000)
#line 149 "regression-compile-tmp/EVENTS.imp"
int TEMP[10000000];
                                                                //    150  
                                                                //    151                      J = 10000000
#line 151 "regression-compile-tmp/EVENTS.imp"
J = 10000000;
                                                                //    152                      Temp (J) = 1 
#line 152 "regression-compile-tmp/EVENTS.imp"
TEMP[(((int)(J)) - (1))] = 1;
                                                                //    153                    %End
#line 153 "regression-compile-tmp/EVENTS.imp"
return;
} // End of block _BLOCK_1_LEVEL_2_ at level 3
_BLOCK_1_LEVEL_2_();
                                                                //    154                    -> Catch
#line 154 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    155  
                                                                //    156  
                                                                //    157          
                                                                //    158          EN(33):   { Failure to open a file.
#line 158 "regression-compile-tmp/EVENTS.imp"
sw2_EN_33:;
                                                                //    159  
                                                                //    160                    Open Input (2, "ZZZZZ.ZZZ")   { Non-existent?
#line 160 "regression-compile-tmp/EVENTS.imp"
_imp_OPENINPUT(2, _imp_str_literal("ZZZZZ.ZZZ"));
                                                                //    161                    -> Catch
#line 161 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    162  
                                                                //    163  
                                                                //    164  
                                                                //    165          EN(41):   { Non-numeric char for numeric input.
#line 165 "regression-compile-tmp/EVENTS.imp"
sw2_EN_41:;
                                                                //    166  
                                                                //    167                    Open Input (2, "Char.dat")
#line 167 "regression-compile-tmp/EVENTS.imp"
_imp_OPENINPUT(2, _imp_str_literal("Char.dat"));
                                                                //    168                    Select Input (2)
#line 168 "regression-compile-tmp/EVENTS.imp"
_imp_SELECTINPUT(2);
                                                                //    169                    Read (J)
#line 169 "regression-compile-tmp/EVENTS.imp"
_imp_READ(&J);
                                                                //    170                    -> Catch
#line 170 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    171  
                                                                //    172  
                                                                //    173          
                                                                //    174          EN(51):   { Inconsistent combination of values for %For loop.
#line 174 "regression-compile-tmp/EVENTS.imp"
sw2_EN_51:;
                                                                //    175  
                                                                //    176                    J = 0
#line 176 "regression-compile-tmp/EVENTS.imp"
J = 0;
                                                                //    177                    A = 0
#line 177 "regression-compile-tmp/EVENTS.imp"
A = 0;
                                                                //    178                    %For C = 2, 1, J %cycle
#line 178 "regression-compile-tmp/EVENTS.imp"
{static int _initial, _increment, _final, _control;
_initial = 2; _increment = 1; _final = J; C = _control = _initial;
if (((_final-_initial) % _increment) != 0) _imp_signal(5,1,0,"Illegal cycle C = 2, 1, J");
C -= _increment; _control -= _increment;
L_0013:;
if (C == _final) goto L_0014;
C += _increment; _control += _increment;
if (C != _control) _imp_signal(4,2,0,"Corrupt control variable C"); /* FOR loop control variable corrupted */
}
                                                                //    179                       A = A + 1 
#line 179 "regression-compile-tmp/EVENTS.imp"
A = (((int)(A)) + (1));
                                                                //    180                       %Exit %if A = 10   { Break an infinite loop.
#line 180 "regression-compile-tmp/EVENTS.imp"
if (((A) != (10))) goto L_0016;
#line 180 "regression-compile-tmp/EVENTS.imp"
goto L_0014;
#line 180 "regression-compile-tmp/EVENTS.imp"
L_0016:;
                                                                //    181                    %Repeat
#line 181 "regression-compile-tmp/EVENTS.imp"
goto L_0013;
#line 181 "regression-compile-tmp/EVENTS.imp"
L_0014:;
                                                                //    182                    -> Catch
#line 182 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    183  
                                                                //    184  
                                                                //    185  
                                                                //    186  
                                                                //    187          EN(52):   { Illegal exponent for exponentiation.
#line 187 "regression-compile-tmp/EVENTS.imp"
sw2_EN_52:;
                                                                //    188  
                                                                //    189                    J = -4
#line 189 "regression-compile-tmp/EVENTS.imp"
J = (-4);
                                                                //    190                    C = 2 ^^ J
#line 190 "regression-compile-tmp/EVENTS.imp"
C = _imp_IEXP(2, J);
                                                                //    191                    -> Catch
#line 191 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    192  
                                                                //    193  
                                                                //    194  
                                                                //    195          EN(53):   { Upper bound less than lower in array declaration.
#line 195 "regression-compile-tmp/EVENTS.imp"
sw2_EN_53:;
                                                                //    196  
                                                                //    197                    J = 20
#line 197 "regression-compile-tmp/EVENTS.imp"
J = 20;
                                                                //    198                    %Begin
#line 198 "regression-compile-tmp/EVENTS.imp"
void _BLOCK_2_LEVEL_2_(void) {
                                                                //    199                       %Integer %Array  Temp (40 : J)
#line 199 "regression-compile-tmp/EVENTS.imp"
int TEMP[(((unsigned char)((((int)(J)) - (40)))) + (1))];
                                                                //    200    
                                                                //    201                       J = 35
#line 201 "regression-compile-tmp/EVENTS.imp"
J = 35;
                                                                //    202                       Temp(J) = 10
#line 202 "regression-compile-tmp/EVENTS.imp"
TEMP[(((int)(J)) - (40))] = 10;
                                                                //    203                    %End
#line 203 "regression-compile-tmp/EVENTS.imp"
return;
} // End of block _BLOCK_2_LEVEL_2_ at level 3
_BLOCK_2_LEVEL_2_();
                                                                //    204                    -> Catch
#line 204 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    205  
                                                                //    206  
                                                                //    207  
                                                                //    208          EN(54):   { First index greater than second for SUB STRING.
#line 208 "regression-compile-tmp/EVENTS.imp"
sw2_EN_54:;
                                                                //    209  
                                                                //    210                    S = "1234567890"
#line 210 "regression-compile-tmp/EVENTS.imp"
S = _imp_str_literal("1234567890");
                                                                //    211                    J = 20
#line 211 "regression-compile-tmp/EVENTS.imp"
J = 20;
                                                                //    212                    S = Sub String (S, J, 5)
#line 212 "regression-compile-tmp/EVENTS.imp"
S = _imp_SUBSTRING(&S, J, 5);
                                                                //    213                    -> Catch
#line 213 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    214  
                                                                //    215  
                                                                //    216  
                                                                //    217          EN(62):   { Array index out of bounds.
#line 217 "regression-compile-tmp/EVENTS.imp"
sw2_EN_62:;
                                                                //    218  
                                                                //    219                    J = 20
#line 219 "regression-compile-tmp/EVENTS.imp"
J = 20;
                                                                //    220                    %Begin
#line 220 "regression-compile-tmp/EVENTS.imp"
void _BLOCK_3_LEVEL_2_(void) {
                                                                //    221                       %Integer %Array  Temp (0 : J)
#line 221 "regression-compile-tmp/EVENTS.imp"
int TEMP[((J) + ((int)(1)))];
                                                                //    222  
                                                                //    223                       Temp (J + 5) = 29
#line 223 "regression-compile-tmp/EVENTS.imp"
TEMP[(((int)(J)) + (5))] = 29;
                                                                //    224                    %End
#line 224 "regression-compile-tmp/EVENTS.imp"
return;
} // End of block _BLOCK_3_LEVEL_2_ at level 3
_BLOCK_3_LEVEL_2_();
                                                                //    225                    -> Catch
#line 225 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    226  
                                                                //    227  
                                                                //    228  
                                                                //    229  
                                                                //    230  
                                                                //    231          EN(65):   { CHAR NO index out of range 1 to max string length.
#line 231 "regression-compile-tmp/EVENTS.imp"
sw2_EN_65:;
                                                                //    232  
                                                                //    233                    S = "1234567890"
#line 233 "regression-compile-tmp/EVENTS.imp"
S = _imp_str_literal("1234567890");
                                                                //    234                    J = 20
#line 234 "regression-compile-tmp/EVENTS.imp"
J = 20;
                                                                //    235                    C = Char No (S, J)
#line 235 "regression-compile-tmp/EVENTS.imp"
C = *_imp_CHARNO(&S, J);
                                                                //    236                    -> Catch
#line 236 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    237  
                                                                //    238  
                                                                //    239  
                                                                //    240          EN(66):   { Value out of range for TO STRING.
#line 240 "regression-compile-tmp/EVENTS.imp"
sw2_EN_66:;
                                                                //    241  
                                                                //    242                    S = To String (Minus)
#line 242 "regression-compile-tmp/EVENTS.imp"
S = _imp_TOSTRING(MINUS);
                                                                //    243                    -> Catch
#line 243 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    244  
                                                                //    245  
                                                                //    246  
                                                                //    247          EN(67):   { Value out of range of OPEN and SELECT.
#line 247 "regression-compile-tmp/EVENTS.imp"
sw2_EN_67:;
                                                                //    248  
                                                                //    249                    SELECT INPUT (20)
#line 249 "regression-compile-tmp/EVENTS.imp"
_imp_SELECTINPUT(20);
                                                                //    250                    -> Catch
#line 250 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    251  
                                                                //    252  
                                                                //    253  
                                                                //    254          EN(70):   { String Resolution error.
#line 254 "regression-compile-tmp/EVENTS.imp"
sw2_EN_70:;
                                                                //    255  
                                                                //    256                    S = "ABCD"
#line 256 "regression-compile-tmp/EVENTS.imp"
S = _imp_str_literal("ABCD");
                                                                //    257                    S -> S.("EFGH")
#line 257 "regression-compile-tmp/EVENTS.imp"
if (!_imp_resolve(S, &S, _imp_str_literal("EFGH"), 0 /*NULL*/)) _imp_signal(7,1,0, "string resolution fails");
                                                                //    258                    -> Catch
#line 258 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    259  
                                                                //    260  
                                                                //    261  
                                                                //    262          EN(81):   { Unassigned variable.
#line 262 "regression-compile-tmp/EVENTS.imp"
sw2_EN_81:;
                                                                //    263  
                                                                //    264                    J = Unassigned
#line 264 "regression-compile-tmp/EVENTS.imp"
J = UNASSIGNED;
                                                                //    265                    -> Catch
#line 265 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    266  
                                                                //    267  
                                                                //    268  
                                                                //    269          EN(90):   { End of Input
#line 269 "regression-compile-tmp/EVENTS.imp"
sw2_EN_90:;
                                                                //    270  
                                                                //    271                    Open Output (2, "Null.dat")
#line 271 "regression-compile-tmp/EVENTS.imp"
_imp_OPENOUTPUT(2, _imp_str_literal("Null.dat"));
                                                                //    272                    Select Output (2)
#line 272 "regression-compile-tmp/EVENTS.imp"
_imp_SELECTOUTPUT(2);
                                                                //    273                    Close Output
#line 273 "regression-compile-tmp/EVENTS.imp"
_imp_CLOSEOUTPUT();
                                                                //    274                    Open Input (2, "Null.dat")
#line 274 "regression-compile-tmp/EVENTS.imp"
_imp_OPENINPUT(2, _imp_str_literal("Null.dat"));
                                                                //    275                    Select Input (2)
#line 275 "regression-compile-tmp/EVENTS.imp"
_imp_SELECTINPUT(2);
                                                                //    276                    Read (J)
#line 276 "regression-compile-tmp/EVENTS.imp"
_imp_READ(&J);
                                                                //    277                    -> Catch
#line 277 "regression-compile-tmp/EVENTS.imp"
goto U_1003;
                                                                //    278  
                                                                //    279   
                                                                //    280          
                                                                //    281             Catch:  Print String ("FAILED to trap:  Event =")
#line 281 "regression-compile-tmp/EVENTS.imp"
U_1003:;
#line 281 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("FAILED to trap:  Event ="));
                                                                //    282                     Write (K // 10, 1)
#line 282 "regression-compile-tmp/EVENTS.imp"
_imp_WRITE(((long)((long)((int)(K)) / (long)((int)(10)))), 1);
                                                                //    283                     Print String ("   Sub =")
#line 283 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("   Sub ="));
                                                                //    284                     Write (Rem (K, 10), 1)
#line 284 "regression-compile-tmp/EVENTS.imp"
_imp_WRITE(_imp_REM(K, 10), 1);
                                                                //    285                     New Line
#line 285 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //    286  
                                                                //    287   
                                                                //    288             EN(*):
#line 288 "regression-compile-tmp/EVENTS.imp"
sw2_EN_default:;
                                                                //    289  
                                                                //    290          %Repeat
#line 290 "regression-compile-tmp/EVENTS.imp"
goto L_000d;
#line 290 "regression-compile-tmp/EVENTS.imp"
L_000e:;
                                                                //    291          
                                                                //    292  
                                                                //    293      %End   { of Test Standard Events
#line 293 "regression-compile-tmp/EVENTS.imp"
/* Remove %on %event handler here if present for this block */
return;
sw2_EN_1:;
sw2_EN_2:;
sw2_EN_3:;
sw2_EN_4:;
sw2_EN_5:;
sw2_EN_6:;
sw2_EN_7:;
sw2_EN_8:;
sw2_EN_9:;
sw2_EN_10:;
sw2_EN_12:;
sw2_EN_15:;
sw2_EN_16:;
sw2_EN_17:;
sw2_EN_18:;
sw2_EN_19:;
sw2_EN_20:;
sw2_EN_22:;
sw2_EN_23:;
sw2_EN_24:;
sw2_EN_25:;
sw2_EN_26:;
sw2_EN_27:;
sw2_EN_28:;
sw2_EN_29:;
sw2_EN_30:;
sw2_EN_31:;
sw2_EN_32:;
sw2_EN_34:;
sw2_EN_35:;
sw2_EN_36:;
sw2_EN_37:;
sw2_EN_38:;
sw2_EN_39:;
sw2_EN_40:;
sw2_EN_42:;
sw2_EN_43:;
sw2_EN_44:;
sw2_EN_45:;
sw2_EN_46:;
sw2_EN_47:;
sw2_EN_48:;
sw2_EN_49:;
sw2_EN_50:;
sw2_EN_55:;
sw2_EN_56:;
sw2_EN_57:;
sw2_EN_58:;
sw2_EN_59:;
sw2_EN_60:;
sw2_EN_61:;
sw2_EN_63:;
sw2_EN_64:;
sw2_EN_68:;
sw2_EN_69:;
sw2_EN_71:;
sw2_EN_72:;
sw2_EN_73:;
sw2_EN_74:;
sw2_EN_75:;
sw2_EN_76:;
sw2_EN_77:;
sw2_EN_78:;
sw2_EN_79:;
sw2_EN_80:;
sw2_EN_82:;
sw2_EN_83:;
sw2_EN_84:;
sw2_EN_85:;
sw2_EN_86:;
sw2_EN_87:;
sw2_EN_88:;
sw2_EN_89:;
sw2_EN_91:;
sw2_EN_92:;
sw2_EN_93:;
sw2_EN_94:;
sw2_EN_95:;
sw2_EN_96:;
sw2_EN_97:;
sw2_EN_98:;
sw2_EN_99:;
sw2_EN_100:;
goto sw2_EN_default;
} // End of block TESTSTANDARDEVENTS at level 2
                                                                //    294          
                                                                //    295  
                                                                //    296  
                                                                //    297     %Routine  Eventful (%Integer Trap)
#line 297 "regression-compile-tmp/EVENTS.imp"
void EVENTFUL( int TRAP )
#line 297 "regression-compile-tmp/EVENTS.imp"
{
                                                                //    298  
                                                                //    299         !*  Tests the trapping of events within a routine block.
                                                                //    300         !*  Does the control fall through the bottom of the %On
                                                                //    301         !*  block?  If a trap is not present will control be passed
                                                                //    302         !*  to the parent block?
                                                                //    303  
                                                                //    304         %Integer E = 14
#line 304 "regression-compile-tmp/EVENTS.imp"
int E;
#line 304 "regression-compile-tmp/EVENTS.imp"
E = 14;
                                                                //    305   
                                                                //    306         %On %Event 14 %Start
#line 306 "regression-compile-tmp/EVENTS.imp"
if (!_imp_on_event(14)) goto L_0017;  /* TO DO: Remove %on %event handler just before L_0017: if present for this block */
                                                                //    307            %Signal %Event 10, 116 %if E = 14 %and Trap = 1
#line 307 "regression-compile-tmp/EVENTS.imp"
if (((E) != (14))) goto L_0018;
#line 307 "regression-compile-tmp/EVENTS.imp"
if (((TRAP) != (1))) goto L_0018;
#line 307 "regression-compile-tmp/EVENTS.imp"
_imp_signal(10, 116, 0, "");
#line 307 "regression-compile-tmp/EVENTS.imp"
L_0018:;
                                                                //    308            E = E + 1
#line 308 "regression-compile-tmp/EVENTS.imp"
E = (((int)(E)) + (1));
                                                                //    309         %Finish
#line 309 "regression-compile-tmp/EVENTS.imp"
L_0017:;
                                                                //    310  
                                                                //    311         %Signal %Event 14  %if E = 14       
#line 311 "regression-compile-tmp/EVENTS.imp"
if (((E) != (14))) goto L_0019;
#line 311 "regression-compile-tmp/EVENTS.imp"
_imp_signal(14, 0, 0, "");
#line 311 "regression-compile-tmp/EVENTS.imp"
L_0019:;
                                                                //    312         %Signal %Event 15, 115, 20        { Test the _Extra field.
#line 312 "regression-compile-tmp/EVENTS.imp"
_imp_signal(15, 115, 20, "");
                                                                //    313  
                                                                //    314     %End  { of Eventful
#line 314 "regression-compile-tmp/EVENTS.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block EVENTFUL at level 2
                                                                //    315  
                                                                //    316  
                                                                //    317  
                                                                //    318  
                                                                //    319  
                                                                //    320     !*   The following set of routines test various aspects of 
                                                                //    321     !*  procedures.  Firstly, it checks whether routines nested
                                                                //    322     !*  to depth four can be handled.  Then it checks %Routine %Specs
                                                                //    323     !*  and mutual recursion.  Finally, at a very deep recursion and
                                                                //    324     !*  level of nesting, the signalling of an event.  This severe 
                                                                //    325     !*  test checks the possibility of stack corruption and automatic
                                                                //    326     !*  %Return from a great, complex depth.
                                                                //    327  
                                                                //    328  
                                                                //    329     %Routine %Spec  Inc (%Integer D)
#line 329 "regression-compile-tmp/EVENTS.imp"
auto void INC( int D );
                                                                //    330  
                                                                //    331  
                                                                //    332     %Routine  Inc2 (%Integer D)
#line 332 "regression-compile-tmp/EVENTS.imp"
void INC2( int D )
#line 332 "regression-compile-tmp/EVENTS.imp"
{
                                                                //    333   
                                                                //    334         %Routine  Inc3 (%Integer D)
#line 334 "regression-compile-tmp/EVENTS.imp"
void INC3( int D )
#line 334 "regression-compile-tmp/EVENTS.imp"
{
                                                                //    335  
                                                                //    336             %Routine  Inc4 (%Integer D)
#line 336 "regression-compile-tmp/EVENTS.imp"
void INC4( int D )
#line 336 "regression-compile-tmp/EVENTS.imp"
{
                                                                //    337    
                                                                //    338                 %Routine  Inc5 (%Integer D)
#line 338 "regression-compile-tmp/EVENTS.imp"
void INC5( int D )
#line 338 "regression-compile-tmp/EVENTS.imp"
{
                                                                //    339  
                                                                //    340                     %If D > 400 %then %Start
#line 340 "regression-compile-tmp/EVENTS.imp"
if (((D) <= (400))) goto L_001a;
                                                                //    341                        %Signal %Event 15, 118
#line 341 "regression-compile-tmp/EVENTS.imp"
_imp_signal(15, 118, 0, "");
                                                                //    342                        Print String ("FAIL: To raise a deep event.")
#line 342 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("FAIL: To raise a deep event."));
                                                                //    343                        New Line
#line 343 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //    344                        %Return
#line 344 "regression-compile-tmp/EVENTS.imp"
/* Remove %on %event handler here if present for this block */
return;
                                                                //    345                     %Finish
#line 345 "regression-compile-tmp/EVENTS.imp"
L_001a:;
                                                                //    346                     Inc (D+1)    { Mutual Recursion.
#line 346 "regression-compile-tmp/EVENTS.imp"
INC((((int)(D)) + (1)));
                                                                //    347  
                                                                //    348                 %End  { of Inc5
#line 348 "regression-compile-tmp/EVENTS.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block INC5 at level 5
                                                                //    349  
                                                                //    350                 Inc5 (D+1)
#line 350 "regression-compile-tmp/EVENTS.imp"
INC5((((int)(D)) + (1)));
                                                                //    351  
                                                                //    352             %End  { of Inc4
#line 352 "regression-compile-tmp/EVENTS.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block INC4 at level 4
                                                                //    353  
                                                                //    354             Inc4 (D+1)
#line 354 "regression-compile-tmp/EVENTS.imp"
INC4((((int)(D)) + (1)));
                                                                //    355  
                                                                //    356         %End  { of Inc3
#line 356 "regression-compile-tmp/EVENTS.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block INC3 at level 3
                                                                //    357  
                                                                //    358         Inc3 (D+1)
#line 358 "regression-compile-tmp/EVENTS.imp"
INC3((((int)(D)) + (1)));
                                                                //    359  
                                                                //    360     %End  { of Inc2
#line 360 "regression-compile-tmp/EVENTS.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block INC2 at level 2
                                                                //    361                     
                                                                //    362  
                                                                //    363  
                                                                //    364  
                                                                //    365     %Routine  Inc (%Integer D)
#line 365 "regression-compile-tmp/EVENTS.imp"
void INC( int D )
#line 365 "regression-compile-tmp/EVENTS.imp"
{
                                                                //    366   
                                                                //    367         Inc2 (D+1)
#line 367 "regression-compile-tmp/EVENTS.imp"
INC2((((int)(D)) + (1)));
                                                                //    368  
                                                                //    369     %End  { of Inc
#line 369 "regression-compile-tmp/EVENTS.imp"
/* Remove %on %event handler here if present for this block */
return;
} // End of block INC at level 2
                                                                //    370  
                                                                //    371  
                                                                //    372  
                                                                //    373     %if cliparam = "" %start
#line 373 "regression-compile-tmp/EVENTS.imp"
if ((_imp_strcmp(_imp_CLIPARAM(), _imp_str_literal("")) != 0)) goto L_001b;
                                                                //    374       Open Output (1, "/tmp/EVENTS.out")
#line 374 "regression-compile-tmp/EVENTS.imp"
_imp_OPENOUTPUT(1, _imp_str_literal("/tmp/EVENTS.out"));
                                                                //    375     %else
#line 375 "regression-compile-tmp/EVENTS.imp"
goto L_001c;
#line 375 "regression-compile-tmp/EVENTS.imp"
L_001b:;
                                                                //    376       print string("Writing to ".cliparam); newline
#line 376 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_join((_imp_string)_imp_str_literal("Writing to "),(_imp_string)_imp_CLIPARAM()));
#line 376 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //    377       Open Output (1, cliparam)
#line 377 "regression-compile-tmp/EVENTS.imp"
_imp_OPENOUTPUT(1, _imp_CLIPARAM());
                                                                //    378     %finish
#line 378 "regression-compile-tmp/EVENTS.imp"
L_001c:;
                                                                //    379     Select Output (1)
#line 379 "regression-compile-tmp/EVENTS.imp"
_imp_SELECTOUTPUT(1);
                                                                //    380  
                                                                //    381     New Lines (3)
#line 381 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINES(3);
                                                                //    382     
                                                                //    383     Print String ("Test the Ability to Raise Standard Events"); New Line
#line 383 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("Test the Ability to Raise Standard Events"));
#line 383 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //    384     Print String ("-----------------------------------------")
#line 384 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("-----------------------------------------"));
                                                                //    385     New Lines (2)
#line 385 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINES(2);
                                                                //    386  
                                                                //    387     Test Standard Events
#line 387 "regression-compile-tmp/EVENTS.imp"
TESTSTANDARDEVENTS();
                                                                //    388  
                                                                //    389     New Lines (2)
#line 389 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINES(2);
                                                                //    390  
                                                                //    391               Eventful(1)
#line 391 "regression-compile-tmp/EVENTS.imp"
EVENTFUL(1);
                                                                //    392     Resume2:  Eventful(0)
#line 392 "regression-compile-tmp/EVENTS.imp"
U_1000:;
#line 392 "regression-compile-tmp/EVENTS.imp"
EVENTFUL(0);
                                                                //    393     Resume3:  Inc (1)
#line 393 "regression-compile-tmp/EVENTS.imp"
U_1001:;
#line 393 "regression-compile-tmp/EVENTS.imp"
INC(1);
                                                                //    394     Resume4:  
#line 394 "regression-compile-tmp/EVENTS.imp"
U_1002:;
                                                                //    395               Print String ("Returned from a depth correctly.")
#line 395 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal("Returned from a depth correctly."));
                                                                //    396               New Lines (2)
#line 396 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINES(2);
                                                                //    397  
                                                                //    398  select output(0)
#line 398 "regression-compile-tmp/EVENTS.imp"
_imp_SELECTOUTPUT(0);
                                                                //    399  write(failures,1);  printstring(" failure(s)");  newline
#line 399 "regression-compile-tmp/EVENTS.imp"
_imp_WRITE(FAILURES, 1);
#line 399 "regression-compile-tmp/EVENTS.imp"
_imp_PRINTSTRING(_imp_str_literal(" failure(s)"));
#line 399 "regression-compile-tmp/EVENTS.imp"
_imp_NEWLINE();
                                                                //    400  
                                                                //    401  %End %of %Program
#line 401 "regression-compile-tmp/EVENTS.imp"
/* Remove %on %event handler here if present for this block */
return 0;
sw1_TRAP_0:;
sw1_TRAP_1:;
sw1_TRAP_2:;
sw1_TRAP_3:;
sw1_TRAP_4:;
sw1_TRAP_5:;
sw1_TRAP_6:;
sw1_TRAP_7:;
sw1_TRAP_8:;
sw1_TRAP_9:;
sw1_TRAP_11:;
sw1_TRAP_12:;
sw1_TRAP_13:;
sw1_TRAP_14:;
goto sw1_TRAP_default;
} // End of block _imp_main at level 1
#line 401 "regression-compile-tmp/EVENTS.imp"
// End of file
