#include <perms.h>

                                                                //      1  %begin; !6-valued logic simulator
#line 1 "regression-bugs-tmp/SIM.imp"
int main(int argc, char **argv) {
  __label__ _imp_endofblock;
  _imp_initialise(argc, argv);
                                                                //      2  
                                                                //      3  %constinteger low=-2,falling=-1,rising=1,high=2
_imp_current_line = 3; _imp_current_file = "regression-bugs-tmp/SIM.imp";
                                                                //      4  %constinteger open=0,undef=((-1)>>1)!!(-1)
_imp_current_line = 4; _imp_current_file = "regression-bugs-tmp/SIM.imp";
                                                                //      5  
                                                                //      6  %record(*)%name nil==record(0)
_imp_current_line = 6; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 6 "regression-bugs-tmp/SIM.imp"
 void /*name*/*NIL;
#line 6 "regression-bugs-tmp/SIM.imp"
NIL =  ( void /* BUG caused by a pooltostr(0) call? */  *) _imp_RECORD(0);
                                                                //      7  
                                                                //      8  %recordformat hfm(%record(hfm)%name next,%integer state,since)
_imp_current_line = 8; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 8 "regression-bugs-tmp/SIM.imp"
typedef struct HFM HFM;
struct HFM {
   HFM /*name*/*NEXT;
  int STATE;
  int SINCE;
};
                                                                //      9  %constinteger slotmax=11; !slots @ 2 lines each, leaves 2 for command etc
_imp_current_line = 9; _imp_current_file = "regression-bugs-tmp/SIM.imp";
                                                                //     10  %constinteger eqmax=800;  !event queue cells
_imp_current_line = 10; _imp_current_file = "regression-bugs-tmp/SIM.imp";
                                                                //     11  %constinteger hmax=5000;  !heap words
_imp_current_line = 11; _imp_current_file = "regression-bugs-tmp/SIM.imp";
                                                                //     12  
                                                                //     13  %constinteger csize=5,psize=5,ssize=10; !size (in words) of heap records
_imp_current_line = 13; _imp_current_file = "regression-bugs-tmp/SIM.imp";
                                                                //     14  %constinteger hsize=3
_imp_current_line = 14; _imp_current_file = "regression-bugs-tmp/SIM.imp";
                                                                //     15  %recordformatspec pinf
_imp_current_line = 15; _imp_current_file = "regression-bugs-tmp/SIM.imp";
                                                                //     16  %recordformatspec sigf
_imp_current_line = 16; _imp_current_file = "regression-bugs-tmp/SIM.imp";
                                                                //     17  %recordformat compf(%record(compf)%name next,
_imp_current_line = 17; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 17 "regression-bugs-tmp/SIM.imp"
typedef struct COMPF COMPF;
struct COMPF {
   COMPF /*name*/*NEXT;
  int TYPE;
   void /*name*/*INS;
   void /*name*/*OUTS;
   void /*name*/*PRIVATE;
};
                                                                //     18                      %integer type {indexes into behaviour switch},
                                                                //     19                      %record(pinf)%name ins,outs,private)
                                                                //     20  %recordformat pinf(%record(pinf)%name next {pin in component},
_imp_current_line = 20; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 20 "regression-bugs-tmp/SIM.imp"
typedef struct PINF PINF;
struct PINF {
   PINF /*name*/*NEXT;
   PINF /*name*/*CHAIN;
   COMPF /*name*/*COMP;
   void /*name*/*SIGNAL;
  int STATE;
};
                                                                //     21                     chain {next pin in net},%record(compf)%name comp,
                                                                //     22                     %record(sigf)%name signal, %integer state)
                                                                //     23  %recordformat sigf(%record(sigf)%name next {for identification},
_imp_current_line = 23; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 23 "regression-bugs-tmp/SIM.imp"
typedef struct SIGF SIGF;
struct SIGF {
   SIGF /*name*/*NEXT;
  int STATE;
   PINF /*name*/*FROM;
   PINF /*name*/*TO;
  int SCREENSLOT;
   HFM /*name*/*HISTORY;
  _imp_string /*%string(15)*/ NAME;
};
                                                                //     24                     %integer state,%record(pinf)%name from,to,
                                                                //     25                     %integer screenslot,%record(hfm)%name history,
                                                                //     26                     %string(15)name)
                                                                //     27  %recordformat eqf(%record(eqf)%name next,%record(pinf)%name pin,
_imp_current_line = 27; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 27 "regression-bugs-tmp/SIM.imp"
typedef struct EQF EQF;
struct EQF {
   EQF /*name*/*NEXT;
   PINF /*name*/*PIN;
  int STATE;
  int WHEN;
};
                                                                //     28                    %integer state,when)
                                                                //     29  
                                                                //     30  %record(sigf)%namearray slot(1:slotmax)
_imp_current_line = 30; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 30 "regression-bugs-tmp/SIM.imp"
 SIGF /*name*/*SLOT[11];
                                                                //     31  %record(eqf)%name eventqueue,eclist
_imp_current_line = 31; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 31 "regression-bugs-tmp/SIM.imp"
 EQF /*name*/*EVENTQUEUE;
#line 31 "regression-bugs-tmp/SIM.imp"
 EQF /*name*/*ECLIST;
                                                                //     32  %record(eqf)%array ecell(1:eqmax)
_imp_current_line = 32; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 32 "regression-bugs-tmp/SIM.imp"
 EQF ECELL[800];
                                                                //     33  %integer now=0
_imp_current_line = 33; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 33 "regression-bugs-tmp/SIM.imp"
int NOW;
#line 33 "regression-bugs-tmp/SIM.imp"
NOW = 0;
                                                                //     34  
                                                                //     35  %integer heapspace=1
_imp_current_line = 35; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 35 "regression-bugs-tmp/SIM.imp"
int HEAPSPACE;
#line 35 "regression-bugs-tmp/SIM.imp"
HEAPSPACE = 1;
                                                                //     36  %integerarray heap(1:hmax)
_imp_current_line = 36; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 36 "regression-bugs-tmp/SIM.imp"
int HEAP[5000];
                                                                //     37  %record(sigf)%name nets==nil
_imp_current_line = 37; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 37 "regression-bugs-tmp/SIM.imp"
 SIGF /*name*/*NETS;
#line 37 "regression-bugs-tmp/SIM.imp"
NETS = NIL;
                                                                //     38  %record(compf)%name components==nil
_imp_current_line = 38; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 38 "regression-bugs-tmp/SIM.imp"
 COMPF /*name*/*COMPONENTS;
#line 38 "regression-bugs-tmp/SIM.imp"
COMPONENTS = NIL;
                                                                //     39  
                                                                //     40  %routine initialise arrays
_imp_current_line = 40; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 40 "regression-bugs-tmp/SIM.imp"
void INITIALISEARRAYS( void )
#line 40 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //     41  %integer i
_imp_current_line = 41; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 41 "regression-bugs-tmp/SIM.imp"
int I;
                                                                //     42    slot(i)==nil %for i=1,1,slotmax
_imp_current_line = 42; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 42 "regression-bugs-tmp/SIM.imp"
I = 0;
if ((((11)-(1)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle I = 1, 1, 11");
L_0002:;
if (I == 11) goto L_0003;
I += 1;
#line 42 "regression-bugs-tmp/SIM.imp"
SLOT[(((int)(I)) - (1))] = NIL;
#line 42 "regression-bugs-tmp/SIM.imp"
goto L_0002;
#line 42 "regression-bugs-tmp/SIM.imp"
L_0003:;
                                                                //     43    ecell(i)_next==ecell(i-1) %for i=2,1,eqmax
_imp_current_line = 43; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 43 "regression-bugs-tmp/SIM.imp"
I = 1;
if ((((800)-(2)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle I = 2, 1, 800");
L_0005:;
if (I == 800) goto L_0006;
I += 1;
#line 43 "regression-bugs-tmp/SIM.imp"
ECELL[(((int)(I)) - (1))].NEXT = &ECELL[(((int)((((int)(I)) - (1)))) - (1))];
#line 43 "regression-bugs-tmp/SIM.imp"
goto L_0005;
#line 43 "regression-bugs-tmp/SIM.imp"
L_0006:;
                                                                //     44    eclist==ecell(eqmax)
_imp_current_line = 44; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 44 "regression-bugs-tmp/SIM.imp"
ECLIST = &ECELL[799];
                                                                //     45    ecell(1)_next==nil
_imp_current_line = 45; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 45 "regression-bugs-tmp/SIM.imp"
ECELL[0].NEXT = NIL;
                                                                //     46    eventqueue==nil
_imp_current_line = 46; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 46 "regression-bugs-tmp/SIM.imp"
EVENTQUEUE = NIL;
                                                                //     47  %end
_imp_current_line = 47; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 47 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block INITIALISEARRAYS at level 2
                                                                //     48  
                                                                //     49  %record(*)%map new(%integer size)
_imp_current_line = 49; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 49 "regression-bugs-tmp/SIM.imp"
 void /*map*/*NEW( int SIZE )
#line 49 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //     50  !This assumes that array elements with increasing
                                                                //     51  !indices have increasing addresses
                                                                //     52    %signal 15 %if heapspace>hmax
_imp_current_line = 52; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 52 "regression-bugs-tmp/SIM.imp"
if (((HEAPSPACE) <= (5000))) goto L_0008;
#line 52 "regression-bugs-tmp/SIM.imp"
_imp_signal(15, 0, 0, "");
#line 52 "regression-bugs-tmp/SIM.imp"
L_0008:;
                                                                //     53    heap(heapspace)=size; heapspace=heapspace+size+1
_imp_current_line = 53; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 53 "regression-bugs-tmp/SIM.imp"
HEAP[(((int)(HEAPSPACE)) - (1))] = SIZE;
_imp_current_line = 53; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 53 "regression-bugs-tmp/SIM.imp"
HEAPSPACE = (((int)((((int)(HEAPSPACE)) + (SIZE)))) + (1));
                                                                //     54    %result==record(addr(heap(heapspace-size)))
_imp_current_line = 54; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 54 "regression-bugs-tmp/SIM.imp"
return _imp_RECORD(_imp_ADDR(&HEAP[(((int)((((int)(HEAPSPACE)) - (SIZE)))) - (1))]));
                                                                //     55  %end
_imp_current_line = 55; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 55 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block NEW at level 2
                                                                //     56  
                                                                //     57  %record(pinf)%map newpin
_imp_current_line = 57; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 57 "regression-bugs-tmp/SIM.imp"
 PINF /*map*/*NEWPIN( void )
#line 57 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //     58  %record(pinf)%name x==new(psize)
_imp_current_line = 58; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 58 "regression-bugs-tmp/SIM.imp"
 PINF /*name*/*X;
#line 58 "regression-bugs-tmp/SIM.imp"
X = NEW(5);
                                                                //     59    x=0; %result==x
_imp_current_line = 59; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 59 "regression-bugs-tmp/SIM.imp"
*X = (PINF){ 0 } /* Assign 0's to all fields of record */;
_imp_current_line = 59; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 59 "regression-bugs-tmp/SIM.imp"
return X;
                                                                //     60  %end
_imp_current_line = 60; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 60 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block NEWPIN at level 2
                                                                //     61  
                                                                //     62  %record(compf)%map newcomp
_imp_current_line = 62; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 62 "regression-bugs-tmp/SIM.imp"
 COMPF /*map*/*NEWCOMP( void )
#line 62 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //     63  %record(compf)%name x==new(csize)
_imp_current_line = 63; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 63 "regression-bugs-tmp/SIM.imp"
 COMPF /*name*/*X;
#line 63 "regression-bugs-tmp/SIM.imp"
X = NEW(5);
                                                                //     64    x=0; %result==x
_imp_current_line = 64; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 64 "regression-bugs-tmp/SIM.imp"
*X = (COMPF){ 0 } /* Assign 0's to all fields of record */;
_imp_current_line = 64; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 64 "regression-bugs-tmp/SIM.imp"
return X;
                                                                //     65  %end
_imp_current_line = 65; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 65 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block NEWCOMP at level 2
                                                                //     66  
                                                                //     67  %record(sigf)%map newsignal
_imp_current_line = 67; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 67 "regression-bugs-tmp/SIM.imp"
 SIGF /*map*/*NEWSIGNAL( void )
#line 67 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //     68  %record(sigf)%name x==new(ssize)
_imp_current_line = 68; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 68 "regression-bugs-tmp/SIM.imp"
 SIGF /*name*/*X;
#line 68 "regression-bugs-tmp/SIM.imp"
X = NEW(10);
                                                                //     69    x=0; x_state=undef; %result==x
_imp_current_line = 69; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 69 "regression-bugs-tmp/SIM.imp"
*X = (SIGF){ 0 } /* Assign 0's to all fields of record */;
_imp_current_line = 69; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 69 "regression-bugs-tmp/SIM.imp"
X->STATE = (-2147483648);
_imp_current_line = 69; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 69 "regression-bugs-tmp/SIM.imp"
return X;
                                                                //     70  %end
_imp_current_line = 70; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 70 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block NEWSIGNAL at level 2
                                                                //     71  
                                                                //     72  %record(hfm)%name history archive==nil
_imp_current_line = 72; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 72 "regression-bugs-tmp/SIM.imp"
 HFM /*name*/*HISTORYARCHIVE;
#line 72 "regression-bugs-tmp/SIM.imp"
HISTORYARCHIVE = NIL;
                                                                //     73  
                                                                //     74  %record(hfm)%map get hist
_imp_current_line = 74; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 74 "regression-bugs-tmp/SIM.imp"
 HFM /*map*/*GETHIST( void )
#line 74 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //     75  %record(hfm)%name h
_imp_current_line = 75; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 75 "regression-bugs-tmp/SIM.imp"
 HFM /*name*/*H;
                                                                //     76    h==history archive
_imp_current_line = 76; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 76 "regression-bugs-tmp/SIM.imp"
H = HISTORYARCHIVE;
                                                                //     77    %if h==nil %then h==new(hsize) %else history archive==h_next
_imp_current_line = 77; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 77 "regression-bugs-tmp/SIM.imp"
if (((H) != (NIL))) goto L_0009;
#line 77 "regression-bugs-tmp/SIM.imp"
H = NEW(3);
#line 77 "regression-bugs-tmp/SIM.imp"
goto L_000a;
#line 77 "regression-bugs-tmp/SIM.imp"
L_0009:;
#line 77 "regression-bugs-tmp/SIM.imp"
HISTORYARCHIVE = H->NEXT;
#line 77 "regression-bugs-tmp/SIM.imp"
L_000a:;
                                                                //     78    h=0; %result==h
_imp_current_line = 78; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 78 "regression-bugs-tmp/SIM.imp"
*H = (HFM){ 0 } /* Assign 0's to all fields of record */;
_imp_current_line = 78; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 78 "regression-bugs-tmp/SIM.imp"
return H;
                                                                //     79  %end
_imp_current_line = 79; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 79 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block GETHIST at level 2
                                                                //     80  
                                                                //     81  %routine put hist(%record(hfm)%name h)
_imp_current_line = 81; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 81 "regression-bugs-tmp/SIM.imp"
void PUTHIST(  HFM /*name*/*H )
#line 81 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //     82    h_next==history archive
_imp_current_line = 82; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 82 "regression-bugs-tmp/SIM.imp"
H->NEXT = HISTORYARCHIVE;
                                                                //     83    history archive==h
_imp_current_line = 83; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 83 "regression-bugs-tmp/SIM.imp"
HISTORYARCHIVE = H;
                                                                //     84  %end
_imp_current_line = 84; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 84 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block PUTHIST at level 2
                                                                //     85  
                                                                //     86  %constinteger esc=27,cur='Y',graph='F',nograph='G',delete='O'
_imp_current_line = 86; _imp_current_file = "regression-bugs-tmp/SIM.imp";
                                                                //     87  %constinteger up='A',home='H',clearscreen='v',clearline='K'
_imp_current_line = 87; _imp_current_file = "regression-bugs-tmp/SIM.imp";
                                                                //     88  %constinteger insert='i',noinsert='j'
_imp_current_line = 88; _imp_current_file = "regression-bugs-tmp/SIM.imp";
                                                                //     89  
                                                                //     90  %routine escape(%integer x)
_imp_current_line = 90; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 90 "regression-bugs-tmp/SIM.imp"
void ESCAPE( int X )
#line 90 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //     91    printsymbol(esc); printsymbol(x)
_imp_current_line = 91; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 91 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSYMBOL(27);
_imp_current_line = 91; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 91 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSYMBOL(X);
                                                                //     92  %end
_imp_current_line = 92; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 92 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block ESCAPE at level 2
                                                                //     93  
                                                                //     94  %routine cursor(%integer x,y)
_imp_current_line = 94; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 94 "regression-bugs-tmp/SIM.imp"
void CURSOR( int X, int Y )
#line 94 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //     95    escape(cur); printsymbol(y+' '); printsymbol(x+' ')
_imp_current_line = 95; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 95 "regression-bugs-tmp/SIM.imp"
ESCAPE(89);
_imp_current_line = 95; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 95 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSYMBOL((((int)(Y)) + (32)));
_imp_current_line = 95; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 95 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSYMBOL((((int)(X)) + (32)));
                                                                //     96  %end
_imp_current_line = 96; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 96 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block CURSOR at level 2
                                                                //     97  
                                                                //     98  %integerfn upper(%integer old,new)
_imp_current_line = 98; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 98 "regression-bugs-tmp/SIM.imp"
int UPPER( int OLD, int NEW )
#line 98 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //     99    old=old+old %if |old|=rising
_imp_current_line = 99; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 99 "regression-bugs-tmp/SIM.imp"
if (((_imp_IMOD(OLD)) != (1))) goto L_000b;
#line 99 "regression-bugs-tmp/SIM.imp"
OLD = (((int)(OLD)) + (OLD));
#line 99 "regression-bugs-tmp/SIM.imp"
L_000b:;
                                                                //    100    new=new+new %if |new|=rising
_imp_current_line = 100; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 100 "regression-bugs-tmp/SIM.imp"
if (((_imp_IMOD(NEW)) != (1))) goto L_000c;
#line 100 "regression-bugs-tmp/SIM.imp"
NEW = (((int)(NEW)) + (NEW));
#line 100 "regression-bugs-tmp/SIM.imp"
L_000c:;
                                                                //    101    %if old=high %start
_imp_current_line = 101; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 101 "regression-bugs-tmp/SIM.imp"
if (((OLD) != (2))) goto L_000d;
                                                                //    102      %result='`' %if new=high
_imp_current_line = 102; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 102 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (2))) goto L_000e;
#line 102 "regression-bugs-tmp/SIM.imp"
return 96;
#line 102 "regression-bugs-tmp/SIM.imp"
L_000e:;
                                                                //    103      %result='l' %if new=low
_imp_current_line = 103; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 103 "regression-bugs-tmp/SIM.imp"
if (((NEW) != ((-2)))) goto L_000f;
#line 103 "regression-bugs-tmp/SIM.imp"
return 108;
#line 103 "regression-bugs-tmp/SIM.imp"
L_000f:;
                                                                //    104      %result='d' %if new=open
_imp_current_line = 104; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 104 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (0))) goto L_0010;
#line 104 "regression-bugs-tmp/SIM.imp"
return 100;
#line 104 "regression-bugs-tmp/SIM.imp"
L_0010:;
                                                                //    105      %result='l'
_imp_current_line = 105; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 105 "regression-bugs-tmp/SIM.imp"
return 108;
                                                                //    106    %finish
_imp_current_line = 106; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 106 "regression-bugs-tmp/SIM.imp"
L_000d:;
                                                                //    107    %if old=low %start
_imp_current_line = 107; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 107 "regression-bugs-tmp/SIM.imp"
if (((OLD) != ((-2)))) goto L_0011;
                                                                //    108      %result='s' %if new=high
_imp_current_line = 108; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 108 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (2))) goto L_0012;
#line 108 "regression-bugs-tmp/SIM.imp"
return 115;
#line 108 "regression-bugs-tmp/SIM.imp"
L_0012:;
                                                                //    109      %result=' ' %if new=low
_imp_current_line = 109; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 109 "regression-bugs-tmp/SIM.imp"
if (((NEW) != ((-2)))) goto L_0013;
#line 109 "regression-bugs-tmp/SIM.imp"
return 32;
#line 109 "regression-bugs-tmp/SIM.imp"
L_0013:;
                                                                //    110      %result='s' %if new=open
_imp_current_line = 110; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 110 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (0))) goto L_0014;
#line 110 "regression-bugs-tmp/SIM.imp"
return 115;
#line 110 "regression-bugs-tmp/SIM.imp"
L_0014:;
                                                                //    111      %result=' '
_imp_current_line = 111; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 111 "regression-bugs-tmp/SIM.imp"
return 32;
                                                                //    112    %finish
_imp_current_line = 112; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 112 "regression-bugs-tmp/SIM.imp"
L_0011:;
                                                                //    113    %if old=open %start
_imp_current_line = 113; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 113 "regression-bugs-tmp/SIM.imp"
if (((OLD) != (0))) goto L_0015;
                                                                //    114      %result='d' %if new=high
_imp_current_line = 114; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 114 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (2))) goto L_0016;
#line 114 "regression-bugs-tmp/SIM.imp"
return 100;
#line 114 "regression-bugs-tmp/SIM.imp"
L_0016:;
                                                                //    115      %result='l' %if new=low
_imp_current_line = 115; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 115 "regression-bugs-tmp/SIM.imp"
if (((NEW) != ((-2)))) goto L_0017;
#line 115 "regression-bugs-tmp/SIM.imp"
return 108;
#line 115 "regression-bugs-tmp/SIM.imp"
L_0017:;
                                                                //    116      %result='d' %if new=open
_imp_current_line = 116; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 116 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (0))) goto L_0018;
#line 116 "regression-bugs-tmp/SIM.imp"
return 100;
#line 116 "regression-bugs-tmp/SIM.imp"
L_0018:;
                                                                //    117      %result='l'
_imp_current_line = 117; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 117 "regression-bugs-tmp/SIM.imp"
return 108;
                                                                //    118    %finish
_imp_current_line = 118; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 118 "regression-bugs-tmp/SIM.imp"
L_0015:;
                                                                //    119    %result='s' %if new=high
_imp_current_line = 119; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 119 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (2))) goto L_0019;
#line 119 "regression-bugs-tmp/SIM.imp"
return 115;
#line 119 "regression-bugs-tmp/SIM.imp"
L_0019:;
                                                                //    120    %result=' ' %if new=low
_imp_current_line = 120; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 120 "regression-bugs-tmp/SIM.imp"
if (((NEW) != ((-2)))) goto L_001a;
#line 120 "regression-bugs-tmp/SIM.imp"
return 32;
#line 120 "regression-bugs-tmp/SIM.imp"
L_001a:;
                                                                //    121    %result=' ' %if new=open
_imp_current_line = 121; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 121 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (0))) goto L_001b;
#line 121 "regression-bugs-tmp/SIM.imp"
return 32;
#line 121 "regression-bugs-tmp/SIM.imp"
L_001b:;
                                                                //    122    %result=' '
_imp_current_line = 122; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 122 "regression-bugs-tmp/SIM.imp"
return 32;
                                                                //    123  %end
_imp_current_line = 123; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 123 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block UPPER at level 2
                                                                //    124  
                                                                //    125  %integerfn lower(%integer old,new)
_imp_current_line = 125; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 125 "regression-bugs-tmp/SIM.imp"
int LOWER( int OLD, int NEW )
#line 125 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    126    old=old+old %if |old|=rising
_imp_current_line = 126; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 126 "regression-bugs-tmp/SIM.imp"
if (((_imp_IMOD(OLD)) != (1))) goto L_001c;
#line 126 "regression-bugs-tmp/SIM.imp"
OLD = (((int)(OLD)) + (OLD));
#line 126 "regression-bugs-tmp/SIM.imp"
L_001c:;
                                                                //    127    new=new+new %if |new|=rising
_imp_current_line = 127; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 127 "regression-bugs-tmp/SIM.imp"
if (((_imp_IMOD(NEW)) != (1))) goto L_001d;
#line 127 "regression-bugs-tmp/SIM.imp"
NEW = (((int)(NEW)) + (NEW));
#line 127 "regression-bugs-tmp/SIM.imp"
L_001d:;
                                                                //    128    %if old=high %start
_imp_current_line = 128; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 128 "regression-bugs-tmp/SIM.imp"
if (((OLD) != (2))) goto L_001e;
                                                                //    129      %result=' ' %if new=high
_imp_current_line = 129; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 129 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (2))) goto L_001f;
#line 129 "regression-bugs-tmp/SIM.imp"
return 32;
#line 129 "regression-bugs-tmp/SIM.imp"
L_001f:;
                                                                //    130      %result='e' %if new=low
_imp_current_line = 130; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 130 "regression-bugs-tmp/SIM.imp"
if (((NEW) != ((-2)))) goto L_0020;
#line 130 "regression-bugs-tmp/SIM.imp"
return 101;
#line 130 "regression-bugs-tmp/SIM.imp"
L_0020:;
                                                                //    131      %result='e' %if new=open
_imp_current_line = 131; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 131 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (0))) goto L_0021;
#line 131 "regression-bugs-tmp/SIM.imp"
return 101;
#line 131 "regression-bugs-tmp/SIM.imp"
L_0021:;
                                                                //    132      %result=' '
_imp_current_line = 132; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 132 "regression-bugs-tmp/SIM.imp"
return 32;
                                                                //    133    %finish
_imp_current_line = 133; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 133 "regression-bugs-tmp/SIM.imp"
L_001e:;
                                                                //    134    %if old=low %start
_imp_current_line = 134; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 134 "regression-bugs-tmp/SIM.imp"
if (((OLD) != ((-2)))) goto L_0022;
                                                                //    135      %result='m' %if new=high
_imp_current_line = 135; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 135 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (2))) goto L_0023;
#line 135 "regression-bugs-tmp/SIM.imp"
return 109;
#line 135 "regression-bugs-tmp/SIM.imp"
L_0023:;
                                                                //    136      %result='`' %if new=low
_imp_current_line = 136; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 136 "regression-bugs-tmp/SIM.imp"
if (((NEW) != ((-2)))) goto L_0024;
#line 136 "regression-bugs-tmp/SIM.imp"
return 96;
#line 136 "regression-bugs-tmp/SIM.imp"
L_0024:;
                                                                //    137      %result='c' %if new=open
_imp_current_line = 137; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 137 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (0))) goto L_0025;
#line 137 "regression-bugs-tmp/SIM.imp"
return 99;
#line 137 "regression-bugs-tmp/SIM.imp"
L_0025:;
                                                                //    138      %result='m'
_imp_current_line = 138; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 138 "regression-bugs-tmp/SIM.imp"
return 109;
                                                                //    139    %finish
_imp_current_line = 139; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 139 "regression-bugs-tmp/SIM.imp"
L_0022:;
                                                                //    140    %if old=open %start
_imp_current_line = 140; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 140 "regression-bugs-tmp/SIM.imp"
if (((OLD) != (0))) goto L_0026;
                                                                //    141      %result='m' %if new=high
_imp_current_line = 141; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 141 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (2))) goto L_0027;
#line 141 "regression-bugs-tmp/SIM.imp"
return 109;
#line 141 "regression-bugs-tmp/SIM.imp"
L_0027:;
                                                                //    142      %result='c' %if new=low
_imp_current_line = 142; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 142 "regression-bugs-tmp/SIM.imp"
if (((NEW) != ((-2)))) goto L_0028;
#line 142 "regression-bugs-tmp/SIM.imp"
return 99;
#line 142 "regression-bugs-tmp/SIM.imp"
L_0028:;
                                                                //    143      %result='c' %if new=open
_imp_current_line = 143; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 143 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (0))) goto L_0029;
#line 143 "regression-bugs-tmp/SIM.imp"
return 99;
#line 143 "regression-bugs-tmp/SIM.imp"
L_0029:;
                                                                //    144      %result='m'
_imp_current_line = 144; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 144 "regression-bugs-tmp/SIM.imp"
return 109;
                                                                //    145    %finish
_imp_current_line = 145; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 145 "regression-bugs-tmp/SIM.imp"
L_0026:;
                                                                //    146    %result='e' %if new=high
_imp_current_line = 146; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 146 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (2))) goto L_002a;
#line 146 "regression-bugs-tmp/SIM.imp"
return 101;
#line 146 "regression-bugs-tmp/SIM.imp"
L_002a:;
                                                                //    147    %result='e' %if new=low
_imp_current_line = 147; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 147 "regression-bugs-tmp/SIM.imp"
if (((NEW) != ((-2)))) goto L_002b;
#line 147 "regression-bugs-tmp/SIM.imp"
return 101;
#line 147 "regression-bugs-tmp/SIM.imp"
L_002b:;
                                                                //    148    %result='%' %if new=open
_imp_current_line = 148; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 148 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (0))) goto L_002c;
#line 148 "regression-bugs-tmp/SIM.imp"
return 37;
#line 148 "regression-bugs-tmp/SIM.imp"
L_002c:;
                                                                //    149    %result=' '
_imp_current_line = 149; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 149 "regression-bugs-tmp/SIM.imp"
return 32;
                                                                //    150  %end
_imp_current_line = 150; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 150 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block LOWER at level 2
                                                                //    151  
                                                                //    152  %routine refresh(%integer i)
_imp_current_line = 152; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 152 "regression-bugs-tmp/SIM.imp"
void REFRESH( int I )
#line 152 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    153  %integer old,new
_imp_current_line = 153; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 153 "regression-bugs-tmp/SIM.imp"
int OLD;
#line 153 "regression-bugs-tmp/SIM.imp"
int NEW;
                                                                //    154  %record(sigf)%name s
_imp_current_line = 154; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 154 "regression-bugs-tmp/SIM.imp"
 SIGF /*name*/*S;
                                                                //    155  %record(hfm)%name h
_imp_current_line = 155; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 155 "regression-bugs-tmp/SIM.imp"
 HFM /*name*/*H;
                                                                //    156    s==slot(i); %returnif s==nil
_imp_current_line = 156; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 156 "regression-bugs-tmp/SIM.imp"
S = SLOT[(((int)(I)) - (1))];
_imp_current_line = 156; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 156 "regression-bugs-tmp/SIM.imp"
if (((S) != (NIL))) goto L_002d;
#line 156 "regression-bugs-tmp/SIM.imp"
return;
#line 156 "regression-bugs-tmp/SIM.imp"
L_002d:;
                                                                //    157    cursor(0,i+i+1); escape(clearline)
_imp_current_line = 157; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 157 "regression-bugs-tmp/SIM.imp"
CURSOR(0, (((int)((((int)(I)) + (I)))) + (1)));
_imp_current_line = 157; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 157 "regression-bugs-tmp/SIM.imp"
ESCAPE(75);
                                                                //    158    cursor(0,i+i);   escape(clearline)
_imp_current_line = 158; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 158 "regression-bugs-tmp/SIM.imp"
CURSOR(0, (((int)(I)) + (I)));
_imp_current_line = 158; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 158 "regression-bugs-tmp/SIM.imp"
ESCAPE(75);
                                                                //    159    cursor(65,i+i+1); printstring(s_name)
_imp_current_line = 159; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 159 "regression-bugs-tmp/SIM.imp"
CURSOR(65, (((int)((((int)(I)) + (I)))) + (1)));
_imp_current_line = 159; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 159 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(S->NAME);
                                                                //    160    cursor(65,i+i);   printstring(s_name); newline
_imp_current_line = 160; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 160 "regression-bugs-tmp/SIM.imp"
CURSOR(65, (((int)(I)) + (I)));
_imp_current_line = 160; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 160 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(S->NAME);
_imp_current_line = 160; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 160 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    161  !rest not in yet
                                                                //    162  %end
_imp_current_line = 162; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 162 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block REFRESH at level 2
                                                                //    163  
                                                                //    164  %routine log(%record(sigf)%name s,%integer old)
_imp_current_line = 164; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 164 "regression-bugs-tmp/SIM.imp"
void LOG(  SIGF /*name*/*S, int OLD )
#line 164 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    165  %integer new,i
_imp_current_line = 165; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 165 "regression-bugs-tmp/SIM.imp"
int NEW;
#line 165 "regression-bugs-tmp/SIM.imp"
int I;
                                                                //    166  %record(hfm)%name h,hh
_imp_current_line = 166; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 166 "regression-bugs-tmp/SIM.imp"
 HFM /*name*/*H;
#line 166 "regression-bugs-tmp/SIM.imp"
 HFM /*name*/*HH;
                                                                //    167    escape(graph)
_imp_current_line = 167; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 167 "regression-bugs-tmp/SIM.imp"
ESCAPE(70);
                                                                //    168    %if s==nil %start; ! Time has passed: old=ticks
_imp_current_line = 168; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 168 "regression-bugs-tmp/SIM.imp"
if (((S) != (NIL))) goto L_002e;
                                                                //    169      %while old>0 %cycle
_imp_current_line = 169; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 169 "regression-bugs-tmp/SIM.imp"
L_002f:;
#line 169 "regression-bugs-tmp/SIM.imp"
if (((OLD) <= (0))) goto L_0030;
                                                                //    170        old=old-1
_imp_current_line = 170; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 170 "regression-bugs-tmp/SIM.imp"
OLD = (((int)(OLD)) - (1));
                                                                //    171        escape(insert)
_imp_current_line = 171; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 171 "regression-bugs-tmp/SIM.imp"
ESCAPE(105);
                                                                //    172        %for i=slotmax,-1,1 %cycle
_imp_current_line = 172; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 172 "regression-bugs-tmp/SIM.imp"
I = 12;
if ((((1)-(11)) % ((-1))) != 0) _imp_signal(5,1,0,"Illegal cycle I = 11, (-1), 1");
L_0032:;
if (I == 1) goto L_0033;
I += (-1);
                                                                //    173          %unless slot(i)==nil %start
_imp_current_line = 173; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 173 "regression-bugs-tmp/SIM.imp"
if (((SLOT[(((int)(I)) - (1))]) == (NIL))) goto L_0035;
                                                                //    174            new=slot(i)_state
_imp_current_line = 174; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 174 "regression-bugs-tmp/SIM.imp"
NEW = SLOT[(((int)(I)) - (1))]->STATE;
                                                                //    175            cursor(0,i+i+1); escape(delete); cursor(63,i+i+1)
_imp_current_line = 175; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 175 "regression-bugs-tmp/SIM.imp"
CURSOR(0, (((int)((((int)(I)) + (I)))) + (1)));
_imp_current_line = 175; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 175 "regression-bugs-tmp/SIM.imp"
ESCAPE(79);
_imp_current_line = 175; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 175 "regression-bugs-tmp/SIM.imp"
CURSOR(63, (((int)((((int)(I)) + (I)))) + (1)));
                                                                //    176            printsymbol(lower(new,new))
_imp_current_line = 176; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 176 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSYMBOL(LOWER(NEW, NEW));
                                                                //    177            cursor(0,i+i); escape(delete);   cursor(63,i+i)
_imp_current_line = 177; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 177 "regression-bugs-tmp/SIM.imp"
CURSOR(0, (((int)(I)) + (I)));
_imp_current_line = 177; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 177 "regression-bugs-tmp/SIM.imp"
ESCAPE(79);
_imp_current_line = 177; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 177 "regression-bugs-tmp/SIM.imp"
CURSOR(63, (((int)(I)) + (I)));
                                                                //    178            printsymbol(upper(new,new))
_imp_current_line = 178; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 178 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSYMBOL(UPPER(NEW, NEW));
                                                                //    179            newline; !??
_imp_current_line = 179; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 179 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    180          %finish
_imp_current_line = 180; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 180 "regression-bugs-tmp/SIM.imp"
L_0035:;
                                                                //    181        %repeat
_imp_current_line = 181; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 181 "regression-bugs-tmp/SIM.imp"
goto L_0032;
#line 181 "regression-bugs-tmp/SIM.imp"
L_0033:;
                                                                //    182        escape(noinsert)
_imp_current_line = 182; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 182 "regression-bugs-tmp/SIM.imp"
ESCAPE(106);
                                                                //    183      %repeat
_imp_current_line = 183; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 183 "regression-bugs-tmp/SIM.imp"
goto L_002f;
#line 183 "regression-bugs-tmp/SIM.imp"
L_0030:;
                                                                //    184    %finishelsestart; ! Signal has changed: old=previous state
_imp_current_line = 184; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 184 "regression-bugs-tmp/SIM.imp"
goto L_0036;
#line 184 "regression-bugs-tmp/SIM.imp"
L_002e:;
                                                                //    185      new=s_state
_imp_current_line = 185; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 185 "regression-bugs-tmp/SIM.imp"
NEW = S->STATE;
                                                                //    186      h==s_history
_imp_current_line = 186; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 186 "regression-bugs-tmp/SIM.imp"
H = S->HISTORY;
                                                                //    187      %if h==nil %start
_imp_current_line = 187; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 187 "regression-bugs-tmp/SIM.imp"
if (((H) != (NIL))) goto L_0037;
                                                                //    188        h==get hist; h_next==h; s_history==h
_imp_current_line = 188; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 188 "regression-bugs-tmp/SIM.imp"
H = GETHIST();
_imp_current_line = 188; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 188 "regression-bugs-tmp/SIM.imp"
H->NEXT = H;
_imp_current_line = 188; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 188 "regression-bugs-tmp/SIM.imp"
S->HISTORY = H;
                                                                //    189        h_since=now; h_state=new
_imp_current_line = 189; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 189 "regression-bugs-tmp/SIM.imp"
H->SINCE = NOW;
_imp_current_line = 189; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 189 "regression-bugs-tmp/SIM.imp"
H->STATE = NEW;
                                                                //    190      %finishelsestart
_imp_current_line = 190; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 190 "regression-bugs-tmp/SIM.imp"
goto L_0038;
#line 190 "regression-bugs-tmp/SIM.imp"
L_0037:;
                                                                //    191        old=h_state; ! overriding
_imp_current_line = 191; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 191 "regression-bugs-tmp/SIM.imp"
OLD = H->STATE;
                                                                //    192        hh==get hist; hh_next==h_next; h_next==hh; s_history==hh
_imp_current_line = 192; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 192 "regression-bugs-tmp/SIM.imp"
HH = GETHIST();
_imp_current_line = 192; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 192 "regression-bugs-tmp/SIM.imp"
HH->NEXT = H->NEXT;
_imp_current_line = 192; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 192 "regression-bugs-tmp/SIM.imp"
H->NEXT = HH;
_imp_current_line = 192; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 192 "regression-bugs-tmp/SIM.imp"
S->HISTORY = HH;
                                                                //    193        hh_since=now; hh_state=new
_imp_current_line = 193; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 193 "regression-bugs-tmp/SIM.imp"
HH->SINCE = NOW;
_imp_current_line = 193; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 193 "regression-bugs-tmp/SIM.imp"
HH->STATE = NEW;
                                                                //    194        h==hh
_imp_current_line = 194; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 194 "regression-bugs-tmp/SIM.imp"
H = HH;
                                                                //    195      %finish
_imp_current_line = 195; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 195 "regression-bugs-tmp/SIM.imp"
L_0038:;
                                                                //    196      %while h_next_next_since <= now-64 %cycle; !scavenge
_imp_current_line = 196; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 196 "regression-bugs-tmp/SIM.imp"
L_0039:;
#line 196 "regression-bugs-tmp/SIM.imp"
if (((H->NEXT->NEXT->SINCE) > ((((int)(NOW)) - (64))))) goto L_003a;
                                                                //    197        hh==h_next; h_next==hh_next; put hist(hh)
_imp_current_line = 197; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 197 "regression-bugs-tmp/SIM.imp"
HH = H->NEXT;
_imp_current_line = 197; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 197 "regression-bugs-tmp/SIM.imp"
H->NEXT = HH->NEXT;
_imp_current_line = 197; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 197 "regression-bugs-tmp/SIM.imp"
PUTHIST(HH);
                                                                //    198      %repeat
_imp_current_line = 198; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 198 "regression-bugs-tmp/SIM.imp"
goto L_0039;
#line 198 "regression-bugs-tmp/SIM.imp"
L_003a:;
                                                                //    199      i=s_screenslot
_imp_current_line = 199; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 199 "regression-bugs-tmp/SIM.imp"
I = S->SCREENSLOT;
                                                                //    200      %if i#0 %start
_imp_current_line = 200; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 200 "regression-bugs-tmp/SIM.imp"
if (((I) == (0))) goto L_003c;
                                                                //    201        cursor(63,i+i+1); printsymbol(lower(old,new))
_imp_current_line = 201; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 201 "regression-bugs-tmp/SIM.imp"
CURSOR(63, (((int)((((int)(I)) + (I)))) + (1)));
_imp_current_line = 201; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 201 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSYMBOL(LOWER(OLD, NEW));
                                                                //    202        cursor(63,i+i);   printsymbol(upper(old,new))
_imp_current_line = 202; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 202 "regression-bugs-tmp/SIM.imp"
CURSOR(63, (((int)(I)) + (I)));
_imp_current_line = 202; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 202 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSYMBOL(UPPER(OLD, NEW));
                                                                //    203        newline; !??
_imp_current_line = 203; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 203 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    204      %finish
_imp_current_line = 204; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 204 "regression-bugs-tmp/SIM.imp"
L_003c:;
                                                                //    205    %finish
_imp_current_line = 205; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 205 "regression-bugs-tmp/SIM.imp"
L_0036:;
                                                                //    206    escape(nograph); newline; !??
_imp_current_line = 206; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 206 "regression-bugs-tmp/SIM.imp"
ESCAPE(71);
_imp_current_line = 206; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 206 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    207  %end
_imp_current_line = 207; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 207 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block LOG at level 2
                                                                //    208  
                                                                //    209  %routine print(%integer state)
_imp_current_line = 209; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 209 "regression-bugs-tmp/SIM.imp"
void PRINT( int STATE )
#line 209 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    210    %if state=high    %then printstring("high")      %elsec
_imp_current_line = 210; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 210 "regression-bugs-tmp/SIM.imp"
if (((STATE) != (2))) goto L_003d;
#line 210 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal("high"));
#line 210 "regression-bugs-tmp/SIM.imp"
goto L_003e;
#line 210 "regression-bugs-tmp/SIM.imp"
L_003d:;
#line 210 "regression-bugs-tmp/SIM.imp"
if (((STATE) != ((-2)))) goto L_003f;
#line 210 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal("low"));
#line 210 "regression-bugs-tmp/SIM.imp"
goto L_003e;
#line 210 "regression-bugs-tmp/SIM.imp"
L_003f:;
#line 210 "regression-bugs-tmp/SIM.imp"
if (((STATE) != ((-2147483648)))) goto L_0040;
#line 210 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal("undefined"));
#line 210 "regression-bugs-tmp/SIM.imp"
goto L_003e;
#line 210 "regression-bugs-tmp/SIM.imp"
L_0040:;
#line 210 "regression-bugs-tmp/SIM.imp"
if (((STATE) != (0))) goto L_0041;
#line 210 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal("open"));
#line 210 "regression-bugs-tmp/SIM.imp"
goto L_003e;
#line 210 "regression-bugs-tmp/SIM.imp"
L_0041:;
#line 210 "regression-bugs-tmp/SIM.imp"
if (((STATE) != (1))) goto L_0042;
#line 210 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal("rising"));
#line 210 "regression-bugs-tmp/SIM.imp"
goto L_003e;
#line 210 "regression-bugs-tmp/SIM.imp"
L_0042:;
#line 210 "regression-bugs-tmp/SIM.imp"
if (((STATE) != ((-1)))) goto L_0043;
#line 210 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal("falling"));
#line 210 "regression-bugs-tmp/SIM.imp"
L_0043:;
#line 210 "regression-bugs-tmp/SIM.imp"
L_003e:;
                                                                //    211    %if state=low     %then printstring("low")       %elsec
                                                                //    212    %if state=undef   %then printstring("undefined") %elsec
                                                                //    213    %if state=open    %then printstring("open")      %elsec
                                                                //    214    %if state=rising  %then printstring("rising")    %elsec
                                                                //    215    %if state=falling %then printstring("falling")
                                                                //    216    newline
_imp_current_line = 216; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 216 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    217  %end
_imp_current_line = 217; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 217 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block PRINT at level 2
                                                                //    218  
                                                                //    219  
                                                                //    220  %routinespec excite(%record(compf)%name c)
_imp_current_line = 220; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 220 "regression-bugs-tmp/SIM.imp"
auto void EXCITE(  COMPF /*name*/*C );
                                                                //    221  
                                                                //    222  %routine propagate(%record(sigf)%name signal)
_imp_current_line = 222; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 222 "regression-bugs-tmp/SIM.imp"
void PROPAGATE(  SIGF /*name*/*SIGNAL )
#line 222 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    223  %integer new,y,old
_imp_current_line = 223; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 223 "regression-bugs-tmp/SIM.imp"
int NEW;
#line 223 "regression-bugs-tmp/SIM.imp"
int Y;
#line 223 "regression-bugs-tmp/SIM.imp"
int OLD;
                                                                //    224  %record(pinf)%name p
_imp_current_line = 224; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 224 "regression-bugs-tmp/SIM.imp"
 PINF /*name*/*P;
                                                                //    225  
                                                                //    226    old=signal_state
_imp_current_line = 226; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 226 "regression-bugs-tmp/SIM.imp"
OLD = SIGNAL->STATE;
                                                                //    227    p==signal_from
_imp_current_line = 227; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 227 "regression-bugs-tmp/SIM.imp"
P = SIGNAL->FROM;
                                                                //    228    %if p==nil %start;     ! External input
_imp_current_line = 228; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 228 "regression-bugs-tmp/SIM.imp"
if (((P) != (NIL))) goto L_0044;
                                                                //    229      new=old; old=undef
_imp_current_line = 229; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 229 "regression-bugs-tmp/SIM.imp"
NEW = OLD;
_imp_current_line = 229; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 229 "regression-bugs-tmp/SIM.imp"
OLD = (-2147483648);
                                                                //    230    %finishelsestart;      ! Establish agreement from all sources
_imp_current_line = 230; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 230 "regression-bugs-tmp/SIM.imp"
goto L_0045;
#line 230 "regression-bugs-tmp/SIM.imp"
L_0044:;
                                                                //    231      new=open
_imp_current_line = 231; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 231 "regression-bugs-tmp/SIM.imp"
NEW = 0;
                                                                //    232      %cycle
_imp_current_line = 232; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 232 "regression-bugs-tmp/SIM.imp"
L_0046:;
                                                                //    233        y=p_state; new=y %if new#y %and new=open
_imp_current_line = 233; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 233 "regression-bugs-tmp/SIM.imp"
Y = P->STATE;
_imp_current_line = 233; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 233 "regression-bugs-tmp/SIM.imp"
if (((NEW) == (Y))) goto L_0049;
#line 233 "regression-bugs-tmp/SIM.imp"
if (((NEW) != (0))) goto L_0049;
#line 233 "regression-bugs-tmp/SIM.imp"
NEW = Y;
#line 233 "regression-bugs-tmp/SIM.imp"
L_0049:;
                                                                //    234        new=undef %andexitif new#y %and y#open; !Conflict
_imp_current_line = 234; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 234 "regression-bugs-tmp/SIM.imp"
if (((NEW) == (Y))) goto L_004a;
#line 234 "regression-bugs-tmp/SIM.imp"
if (((Y) == (0))) goto L_004a;
#line 234 "regression-bugs-tmp/SIM.imp"
NEW = (-2147483648);
#line 234 "regression-bugs-tmp/SIM.imp"
goto L_0047;
#line 234 "regression-bugs-tmp/SIM.imp"
L_004a:;
                                                                //    235        p==p_chain
_imp_current_line = 235; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 235 "regression-bugs-tmp/SIM.imp"
P = P->CHAIN;
                                                                //    236      %repeatuntil p==nil
_imp_current_line = 236; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 236 "regression-bugs-tmp/SIM.imp"
if (((P) == (NIL))) goto L_0047;
#line 236 "regression-bugs-tmp/SIM.imp"
goto L_0046;
#line 236 "regression-bugs-tmp/SIM.imp"
L_0047:;
                                                                //    237      %returnif signal_state=new
_imp_current_line = 237; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 237 "regression-bugs-tmp/SIM.imp"
if (((SIGNAL->STATE) != (NEW))) goto L_004b;
#line 237 "regression-bugs-tmp/SIM.imp"
return;
#line 237 "regression-bugs-tmp/SIM.imp"
L_004b:;
                                                                //    238      %if |old|=rising %start; !Forced: Set all sources
_imp_current_line = 238; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 238 "regression-bugs-tmp/SIM.imp"
if (((_imp_IMOD(OLD)) != (1))) goto L_004c;
                                                                //    239        new=old+old; p==signal_from
_imp_current_line = 239; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 239 "regression-bugs-tmp/SIM.imp"
NEW = (((int)(OLD)) + (OLD));
_imp_current_line = 239; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 239 "regression-bugs-tmp/SIM.imp"
P = SIGNAL->FROM;
                                                                //    240        %cycle
_imp_current_line = 240; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 240 "regression-bugs-tmp/SIM.imp"
L_004d:;
                                                                //    241          p_state=new; p==p_chain
_imp_current_line = 241; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 241 "regression-bugs-tmp/SIM.imp"
P->STATE = NEW;
_imp_current_line = 241; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 241 "regression-bugs-tmp/SIM.imp"
P = P->CHAIN;
                                                                //    242        %repeatuntil p==nil
_imp_current_line = 242; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 242 "regression-bugs-tmp/SIM.imp"
if (((P) == (NIL))) goto L_004e;
#line 242 "regression-bugs-tmp/SIM.imp"
goto L_004d;
#line 242 "regression-bugs-tmp/SIM.imp"
L_004e:;
                                                                //    243        newline
_imp_current_line = 243; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 243 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    244      %finish
_imp_current_line = 244; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 244 "regression-bugs-tmp/SIM.imp"
L_004c:;
                                                                //    245      signal_state=new
_imp_current_line = 245; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 245 "regression-bugs-tmp/SIM.imp"
SIGNAL->STATE = NEW;
                                                                //    246    %finish
_imp_current_line = 246; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 246 "regression-bugs-tmp/SIM.imp"
L_0045:;
                                                                //    247  
                                                                //    248    log(signal,old)
_imp_current_line = 248; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 248 "regression-bugs-tmp/SIM.imp"
LOG(SIGNAL, OLD);
                                                                //    249  
                                                                //    250  ! Excite all components with inputs connected to this signal
                                                                //    251  
                                                                //    252    p==signal_to
_imp_current_line = 252; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 252 "regression-bugs-tmp/SIM.imp"
P = SIGNAL->TO;
                                                                //    253    y=new; y=rising %if y=high; y=falling %if y=low
_imp_current_line = 253; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 253 "regression-bugs-tmp/SIM.imp"
Y = NEW;
_imp_current_line = 253; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 253 "regression-bugs-tmp/SIM.imp"
if (((Y) != (2))) goto L_0050;
#line 253 "regression-bugs-tmp/SIM.imp"
Y = 1;
#line 253 "regression-bugs-tmp/SIM.imp"
L_0050:;
_imp_current_line = 253; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 253 "regression-bugs-tmp/SIM.imp"
if (((Y) != ((-2)))) goto L_0051;
#line 253 "regression-bugs-tmp/SIM.imp"
Y = (-1);
#line 253 "regression-bugs-tmp/SIM.imp"
L_0051:;
                                                                //    254    %whilenot p==nil %cycle
_imp_current_line = 254; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 254 "regression-bugs-tmp/SIM.imp"
L_0052:;
#line 254 "regression-bugs-tmp/SIM.imp"
if (((P) == (NIL))) goto L_0053;
                                                                //    255      p_state=y; excite(p_comp)
_imp_current_line = 255; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 255 "regression-bugs-tmp/SIM.imp"
P->STATE = Y;
_imp_current_line = 255; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 255 "regression-bugs-tmp/SIM.imp"
EXCITE(P->COMP);
                                                                //    256      p_state=new; excite(p_comp); p==p_chain
_imp_current_line = 256; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 256 "regression-bugs-tmp/SIM.imp"
P->STATE = NEW;
_imp_current_line = 256; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 256 "regression-bugs-tmp/SIM.imp"
EXCITE(P->COMP);
_imp_current_line = 256; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 256 "regression-bugs-tmp/SIM.imp"
P = P->CHAIN;
                                                                //    257    %repeat
_imp_current_line = 257; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 257 "regression-bugs-tmp/SIM.imp"
goto L_0052;
#line 257 "regression-bugs-tmp/SIM.imp"
L_0053:;
                                                                //    258  %end
_imp_current_line = 258; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 258 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block PROPAGATE at level 2
                                                                //    259  
                                                                //    260  %routine make(%record(pinf)%name pin,%integer new,when)
_imp_current_line = 260; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 260 "regression-bugs-tmp/SIM.imp"
void MAKE(  PINF /*name*/*PIN, int NEW, int WHEN )
#line 260 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    261  %record(eqf)%name e,f
_imp_current_line = 261; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 261 "regression-bugs-tmp/SIM.imp"
 EQF /*name*/*E;
#line 261 "regression-bugs-tmp/SIM.imp"
 EQF /*name*/*F;
                                                                //    262  %integer old
_imp_current_line = 262; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 262 "regression-bugs-tmp/SIM.imp"
int OLD;
                                                                //    263    new=new+new %if |new|=rising
_imp_current_line = 263; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 263 "regression-bugs-tmp/SIM.imp"
if (((_imp_IMOD(NEW)) != (1))) goto L_0055;
#line 263 "regression-bugs-tmp/SIM.imp"
NEW = (((int)(NEW)) + (NEW));
#line 263 "regression-bugs-tmp/SIM.imp"
L_0055:;
                                                                //    264    %unless when=now %start;   ! Insert this event in event queue
_imp_current_line = 264; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 264 "regression-bugs-tmp/SIM.imp"
if (((WHEN) == (NOW))) goto L_0056;
                                                                //    265      e==eclist; %signal 15 %if e==nil
_imp_current_line = 265; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 265 "regression-bugs-tmp/SIM.imp"
E = ECLIST;
_imp_current_line = 265; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 265 "regression-bugs-tmp/SIM.imp"
if (((E) != (NIL))) goto L_0057;
#line 265 "regression-bugs-tmp/SIM.imp"
_imp_signal(15, 0, 0, "");
#line 265 "regression-bugs-tmp/SIM.imp"
L_0057:;
                                                                //    266      eclist==e_next; e_next==nil
_imp_current_line = 266; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 266 "regression-bugs-tmp/SIM.imp"
ECLIST = E->NEXT;
_imp_current_line = 266; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 266 "regression-bugs-tmp/SIM.imp"
E->NEXT = NIL;
                                                                //    267      e_pin==pin; e_state=new; e_when=when
_imp_current_line = 267; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 267 "regression-bugs-tmp/SIM.imp"
E->PIN = PIN;
_imp_current_line = 267; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 267 "regression-bugs-tmp/SIM.imp"
E->STATE = NEW;
_imp_current_line = 267; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 267 "regression-bugs-tmp/SIM.imp"
E->WHEN = WHEN;
                                                                //    268      f==eventqueue
_imp_current_line = 268; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 268 "regression-bugs-tmp/SIM.imp"
F = EVENTQUEUE;
                                                                //    269      %if f==nil %start
_imp_current_line = 269; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 269 "regression-bugs-tmp/SIM.imp"
if (((F) != (NIL))) goto L_0058;
                                                                //    270        eventqueue==e; %return
_imp_current_line = 270; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 270 "regression-bugs-tmp/SIM.imp"
EVENTQUEUE = E;
_imp_current_line = 270; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 270 "regression-bugs-tmp/SIM.imp"
return;
                                                                //    271      %finish
_imp_current_line = 271; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 271 "regression-bugs-tmp/SIM.imp"
L_0058:;
                                                                //    272      %if when<f_when %start
_imp_current_line = 272; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 272 "regression-bugs-tmp/SIM.imp"
if (((WHEN) >= (F->WHEN))) goto L_0059;
                                                                //    273        e_next==f; eventqueue==e; %return
_imp_current_line = 273; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 273 "regression-bugs-tmp/SIM.imp"
E->NEXT = F;
_imp_current_line = 273; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 273 "regression-bugs-tmp/SIM.imp"
EVENTQUEUE = E;
_imp_current_line = 273; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 273 "regression-bugs-tmp/SIM.imp"
return;
                                                                //    274      %finish
_imp_current_line = 274; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 274 "regression-bugs-tmp/SIM.imp"
L_0059:;
                                                                //    275      %cycle
_imp_current_line = 275; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 275 "regression-bugs-tmp/SIM.imp"
L_005a:;
                                                                //    276        %if f_next==nil %start
_imp_current_line = 276; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 276 "regression-bugs-tmp/SIM.imp"
if (((F->NEXT) != (NIL))) goto L_005d;
                                                                //    277          f_next==e; %return
_imp_current_line = 277; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 277 "regression-bugs-tmp/SIM.imp"
F->NEXT = E;
_imp_current_line = 277; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 277 "regression-bugs-tmp/SIM.imp"
return;
                                                                //    278        %finish
_imp_current_line = 278; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 278 "regression-bugs-tmp/SIM.imp"
L_005d:;
                                                                //    279        %if when<f_next_when %start
_imp_current_line = 279; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 279 "regression-bugs-tmp/SIM.imp"
if (((WHEN) >= (F->NEXT->WHEN))) goto L_005e;
                                                                //    280          e_next==f_next; f_next==e; %return
_imp_current_line = 280; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 280 "regression-bugs-tmp/SIM.imp"
E->NEXT = F->NEXT;
_imp_current_line = 280; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 280 "regression-bugs-tmp/SIM.imp"
F->NEXT = E;
_imp_current_line = 280; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 280 "regression-bugs-tmp/SIM.imp"
return;
                                                                //    281        %finish
_imp_current_line = 281; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 281 "regression-bugs-tmp/SIM.imp"
L_005e:;
                                                                //    282        f==f_next
_imp_current_line = 282; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 282 "regression-bugs-tmp/SIM.imp"
F = F->NEXT;
                                                                //    283      %repeat
_imp_current_line = 283; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 283 "regression-bugs-tmp/SIM.imp"
goto L_005a;
                                                                //    284    %finish
_imp_current_line = 284; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 284 "regression-bugs-tmp/SIM.imp"
L_0056:;
                                                                //    285    old=pin_state; %returnif old=new
_imp_current_line = 285; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 285 "regression-bugs-tmp/SIM.imp"
OLD = PIN->STATE;
_imp_current_line = 285; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 285 "regression-bugs-tmp/SIM.imp"
if (((OLD) != (NEW))) goto L_005f;
#line 285 "regression-bugs-tmp/SIM.imp"
return;
#line 285 "regression-bugs-tmp/SIM.imp"
L_005f:;
                                                                //    286    pin_state=new; %returnif pin_signal==nil
_imp_current_line = 286; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 286 "regression-bugs-tmp/SIM.imp"
PIN->STATE = NEW;
_imp_current_line = 286; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 286 "regression-bugs-tmp/SIM.imp"
if (((PIN->SIGNAL) != (NIL))) goto L_0060;
#line 286 "regression-bugs-tmp/SIM.imp"
return;
#line 286 "regression-bugs-tmp/SIM.imp"
L_0060:;
                                                                //    287    propagate(pin_signal)
_imp_current_line = 287; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 287 "regression-bugs-tmp/SIM.imp"
PROPAGATE(PIN->SIGNAL);
                                                                //    288  %end
_imp_current_line = 288; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 288 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block MAKE at level 2
                                                                //    289  
                                                                //    290  %routine aftermath;  ! Flush event queue
_imp_current_line = 290; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 290 "regression-bugs-tmp/SIM.imp"
void AFTERMATH( void )
#line 290 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    291  %record(eqf)%name e
_imp_current_line = 291; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 291 "regression-bugs-tmp/SIM.imp"
 EQF /*name*/*E;
                                                                //    292    %cycle
_imp_current_line = 292; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 292 "regression-bugs-tmp/SIM.imp"
L_0061:;
                                                                //    293      e==eventqueue; %returnif e==nil
_imp_current_line = 293; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 293 "regression-bugs-tmp/SIM.imp"
E = EVENTQUEUE;
_imp_current_line = 293; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 293 "regression-bugs-tmp/SIM.imp"
if (((E) != (NIL))) goto L_005b;
#line 293 "regression-bugs-tmp/SIM.imp"
return;
#line 293 "regression-bugs-tmp/SIM.imp"
L_005b:;
                                                                //    294      eventqueue==e_next; e_next==eclist; eclist==e
_imp_current_line = 294; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 294 "regression-bugs-tmp/SIM.imp"
EVENTQUEUE = E->NEXT;
_imp_current_line = 294; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 294 "regression-bugs-tmp/SIM.imp"
E->NEXT = ECLIST;
_imp_current_line = 294; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 294 "regression-bugs-tmp/SIM.imp"
ECLIST = E;
                                                                //    295      log(nil,e_when-now)
_imp_current_line = 295; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 295 "regression-bugs-tmp/SIM.imp"
LOG(NIL, (((int)(E->WHEN)) - (NOW)));
                                                                //    296      now=e_when
_imp_current_line = 296; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 296 "regression-bugs-tmp/SIM.imp"
NOW = E->WHEN;
                                                                //    297      make(e_pin,e_state,now)
_imp_current_line = 297; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 297 "regression-bugs-tmp/SIM.imp"
MAKE(E->PIN, E->STATE, NOW);
                                                                //    298    %repeat
_imp_current_line = 298; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 298 "regression-bugs-tmp/SIM.imp"
goto L_0061;
                                                                //    299  %end
_imp_current_line = 299; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 299 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block AFTERMATH at level 2
                                                                //    300  
                                                                //    301  ! Basic logic primitives
                                                                //    302  ! Note that NOT is just minus
                                                                //    303  
                                                                //    304  %integerfn float(%integer x)
_imp_current_line = 304; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 304 "regression-bugs-tmp/SIM.imp"
int FLOAT( int X )
#line 304 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    305    x=high %if x=open
_imp_current_line = 305; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 305 "regression-bugs-tmp/SIM.imp"
if (((X) != (0))) goto L_0062;
#line 305 "regression-bugs-tmp/SIM.imp"
X = 2;
#line 305 "regression-bugs-tmp/SIM.imp"
L_0062:;
                                                                //    306    x=x+x %if |x|=rising
_imp_current_line = 306; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 306 "regression-bugs-tmp/SIM.imp"
if (((_imp_IMOD(X)) != (1))) goto L_0064;
#line 306 "regression-bugs-tmp/SIM.imp"
X = (((int)(X)) + (X));
#line 306 "regression-bugs-tmp/SIM.imp"
L_0064:;
                                                                //    307    %result=x
_imp_current_line = 307; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 307 "regression-bugs-tmp/SIM.imp"
return X;
                                                                //    308  %end
_imp_current_line = 308; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 308 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block FLOAT at level 2
                                                                //    309  
                                                                //    310  %integerfn edgefloat(%integer x)
_imp_current_line = 310; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 310 "regression-bugs-tmp/SIM.imp"
int EDGEFLOAT( int X )
#line 310 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    311    x=undef %if x=open
_imp_current_line = 311; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 311 "regression-bugs-tmp/SIM.imp"
if (((X) != (0))) goto L_0065;
#line 311 "regression-bugs-tmp/SIM.imp"
X = (-2147483648);
#line 311 "regression-bugs-tmp/SIM.imp"
L_0065:;
                                                                //    312    %result=x
_imp_current_line = 312; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 312 "regression-bugs-tmp/SIM.imp"
return X;
                                                                //    313  %end
_imp_current_line = 313; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 313 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block EDGEFLOAT at level 2
                                                                //    314  
                                                                //    315  %integerfn setupfloat(%integer x)
_imp_current_line = 315; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 315 "regression-bugs-tmp/SIM.imp"
int SETUPFLOAT( int X )
#line 315 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    316    x=high %if x=open %or x=falling
_imp_current_line = 316; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 316 "regression-bugs-tmp/SIM.imp"
if (((X) == (0))) goto L_0063;
#line 316 "regression-bugs-tmp/SIM.imp"
if (((X) != ((-1)))) goto L_0066;
#line 316 "regression-bugs-tmp/SIM.imp"
L_0063:;
#line 316 "regression-bugs-tmp/SIM.imp"
X = 2;
#line 316 "regression-bugs-tmp/SIM.imp"
L_0066:;
                                                                //    317    x=low %if x=rising
_imp_current_line = 317; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 317 "regression-bugs-tmp/SIM.imp"
if (((X) != (1))) goto L_0067;
#line 317 "regression-bugs-tmp/SIM.imp"
X = (-2);
#line 317 "regression-bugs-tmp/SIM.imp"
L_0067:;
                                                                //    318    %result=x
_imp_current_line = 318; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 318 "regression-bugs-tmp/SIM.imp"
return X;
                                                                //    319  %end
_imp_current_line = 319; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 319 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block SETUPFLOAT at level 2
                                                                //    320  
                                                                //    321  %integerfn and(%integer x,y)
_imp_current_line = 321; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 321 "regression-bugs-tmp/SIM.imp"
int AND( int X, int Y )
#line 321 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    322    %result=low %if x=low %or y=low
_imp_current_line = 322; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 322 "regression-bugs-tmp/SIM.imp"
if (((X) == ((-2)))) goto L_0068;
#line 322 "regression-bugs-tmp/SIM.imp"
if (((Y) != ((-2)))) goto L_0069;
#line 322 "regression-bugs-tmp/SIM.imp"
L_0068:;
#line 322 "regression-bugs-tmp/SIM.imp"
return (-2);
#line 322 "regression-bugs-tmp/SIM.imp"
L_0069:;
                                                                //    323    %result=undef %if x=undef %or y=undef
_imp_current_line = 323; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 323 "regression-bugs-tmp/SIM.imp"
if (((X) == ((-2147483648)))) goto L_006a;
#line 323 "regression-bugs-tmp/SIM.imp"
if (((Y) != ((-2147483648)))) goto L_006b;
#line 323 "regression-bugs-tmp/SIM.imp"
L_006a:;
#line 323 "regression-bugs-tmp/SIM.imp"
return (-2147483648);
#line 323 "regression-bugs-tmp/SIM.imp"
L_006b:;
                                                                //    324    %result=high
_imp_current_line = 324; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 324 "regression-bugs-tmp/SIM.imp"
return 2;
                                                                //    325  %end
_imp_current_line = 325; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 325 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block AND at level 2
                                                                //    326  
                                                                //    327  %integerfn or(%integer x,y)
_imp_current_line = 327; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 327 "regression-bugs-tmp/SIM.imp"
int OR( int X, int Y )
#line 327 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    328    %result=high %if x=high %or y=high
_imp_current_line = 328; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 328 "regression-bugs-tmp/SIM.imp"
if (((X) == (2))) goto L_006c;
#line 328 "regression-bugs-tmp/SIM.imp"
if (((Y) != (2))) goto L_006d;
#line 328 "regression-bugs-tmp/SIM.imp"
L_006c:;
#line 328 "regression-bugs-tmp/SIM.imp"
return 2;
#line 328 "regression-bugs-tmp/SIM.imp"
L_006d:;
                                                                //    329    %result=undef %if x=undef %or y=undef
_imp_current_line = 329; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 329 "regression-bugs-tmp/SIM.imp"
if (((X) == ((-2147483648)))) goto L_006e;
#line 329 "regression-bugs-tmp/SIM.imp"
if (((Y) != ((-2147483648)))) goto L_006f;
#line 329 "regression-bugs-tmp/SIM.imp"
L_006e:;
#line 329 "regression-bugs-tmp/SIM.imp"
return (-2147483648);
#line 329 "regression-bugs-tmp/SIM.imp"
L_006f:;
                                                                //    330    %result=low
_imp_current_line = 330; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 330 "regression-bugs-tmp/SIM.imp"
return (-2);
                                                                //    331  %end
_imp_current_line = 331; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 331 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block OR at level 2
                                                                //    332  
                                                                //    333  %integerfn xor(%integer x,y)
_imp_current_line = 333; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 333 "regression-bugs-tmp/SIM.imp"
int XOR( int X, int Y )
#line 333 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    334    %result=undef %if x=undef %or y=undef
_imp_current_line = 334; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 334 "regression-bugs-tmp/SIM.imp"
if (((X) == ((-2147483648)))) goto L_0070;
#line 334 "regression-bugs-tmp/SIM.imp"
if (((Y) != ((-2147483648)))) goto L_0071;
#line 334 "regression-bugs-tmp/SIM.imp"
L_0070:;
#line 334 "regression-bugs-tmp/SIM.imp"
return (-2147483648);
#line 334 "regression-bugs-tmp/SIM.imp"
L_0071:;
                                                                //    335    %result=low %if x=y
_imp_current_line = 335; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 335 "regression-bugs-tmp/SIM.imp"
if (((X) != (Y))) goto L_0072;
#line 335 "regression-bugs-tmp/SIM.imp"
return (-2);
#line 335 "regression-bugs-tmp/SIM.imp"
L_0072:;
                                                                //    336    %result=high
_imp_current_line = 336; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 336 "regression-bugs-tmp/SIM.imp"
return 2;
                                                                //    337  %end
_imp_current_line = 337; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 337 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block XOR at level 2
                                                                //    338  
                                                                //    339  %integerfn oc(%integer x); !open collector
_imp_current_line = 339; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 339 "regression-bugs-tmp/SIM.imp"
int OC( int X )
#line 339 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    340    %result=open %if x=high %or x=rising
_imp_current_line = 340; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 340 "regression-bugs-tmp/SIM.imp"
if (((X) == (2))) goto L_0073;
#line 340 "regression-bugs-tmp/SIM.imp"
if (((X) != (1))) goto L_0074;
#line 340 "regression-bugs-tmp/SIM.imp"
L_0073:;
#line 340 "regression-bugs-tmp/SIM.imp"
return 0;
#line 340 "regression-bugs-tmp/SIM.imp"
L_0074:;
                                                                //    341    %result=x
_imp_current_line = 341; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 341 "regression-bugs-tmp/SIM.imp"
return X;
                                                                //    342  %end
_imp_current_line = 342; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 342 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block OC at level 2
                                                                //    343  
                                                                //    344  %constinteger known=13
_imp_current_line = 344; _imp_current_file = "regression-bugs-tmp/SIM.imp";
                                                                //    345  %conststring(15)%array type(0:known)="???",
_imp_current_line = 345; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 345 "regression-bugs-tmp/SIM.imp"
const _imp_string /*%string(15)*/ TYPE[14] = { _imp_str_literal("???"), _imp_str_literal("INV"), _imp_str_literal("INVO"), _imp_str_literal("AND"), _imp_str_literal("NAND"), _imp_str_literal("NANDO"), _imp_str_literal("OR"), _imp_str_literal("NOR"), _imp_str_literal("NORO"), _imp_str_literal("XOR"), _imp_str_literal("U74"), _imp_str_literal("TSBUF"), _imp_str_literal("U374"), _imp_str_literal("U123"),  };
                                                                //    346  "INV",  "INVO",
                                                                //    347  "AND",  "NAND",
                                                                //    348  "NANDO","OR",
                                                                //    349  "NOR",  "NORO",
                                                                //    350  "XOR",  "U74",
                                                                //    351  "TSBUF","U374",
                                                                //    352  "U123"
                                                                //    353  
                                                                //    354  %routine fail(%record(compf)%name c,%record(sigf)%name s,%string(15)m)
_imp_current_line = 354; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 354 "regression-bugs-tmp/SIM.imp"
void FAIL(  COMPF /*name*/*C,  SIGF /*name*/*S, _imp_string /*%string(15)*/ M )
#line 354 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    355  %record(pinf)%name p
_imp_current_line = 355; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 355 "regression-bugs-tmp/SIM.imp"
 PINF /*name*/*P;
                                                                //    356  %integer n
_imp_current_line = 356; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 356 "regression-bugs-tmp/SIM.imp"
int N;
                                                                //    357    printstring(m)
_imp_current_line = 357; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 357 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(M);
                                                                //    358    %unless s==nil %start
_imp_current_line = 358; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 358 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_0075;
                                                                //    359      printstring(" Net "); printstring(s_name)
_imp_current_line = 359; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 359 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal(" Net "));
_imp_current_line = 359; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 359 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(S->NAME);
                                                                //    360      p==s_from; n=0
_imp_current_line = 360; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 360 "regression-bugs-tmp/SIM.imp"
P = S->FROM;
_imp_current_line = 360; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 360 "regression-bugs-tmp/SIM.imp"
N = 0;
                                                                //    361      %whilenot p==nil %cycle
_imp_current_line = 361; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 361 "regression-bugs-tmp/SIM.imp"
L_0076:;
#line 361 "regression-bugs-tmp/SIM.imp"
if (((P) == (NIL))) goto L_0077;
                                                                //    362        n=n+1; p==p_chain
_imp_current_line = 362; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 362 "regression-bugs-tmp/SIM.imp"
N = (((int)(N)) + (1));
_imp_current_line = 362; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 362 "regression-bugs-tmp/SIM.imp"
P = P->CHAIN;
                                                                //    363      %repeat
_imp_current_line = 363; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 363 "regression-bugs-tmp/SIM.imp"
goto L_0076;
#line 363 "regression-bugs-tmp/SIM.imp"
L_0077:;
                                                                //    364      write(n,1)
_imp_current_line = 364; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 364 "regression-bugs-tmp/SIM.imp"
_imp_WRITE(N, 1);
                                                                //    365      p==s_to; n=0
_imp_current_line = 365; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 365 "regression-bugs-tmp/SIM.imp"
P = S->TO;
_imp_current_line = 365; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 365 "regression-bugs-tmp/SIM.imp"
N = 0;
                                                                //    366      %whilenot p==nil %cycle
_imp_current_line = 366; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 366 "regression-bugs-tmp/SIM.imp"
L_0079:;
#line 366 "regression-bugs-tmp/SIM.imp"
if (((P) == (NIL))) goto L_007a;
                                                                //    367        n=n+1; p==p_chain
_imp_current_line = 367; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 367 "regression-bugs-tmp/SIM.imp"
N = (((int)(N)) + (1));
_imp_current_line = 367; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 367 "regression-bugs-tmp/SIM.imp"
P = P->CHAIN;
                                                                //    368      %repeat
_imp_current_line = 368; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 368 "regression-bugs-tmp/SIM.imp"
goto L_0079;
#line 368 "regression-bugs-tmp/SIM.imp"
L_007a:;
                                                                //    369      write(n,1); newline
_imp_current_line = 369; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 369 "regression-bugs-tmp/SIM.imp"
_imp_WRITE(N, 1);
_imp_current_line = 369; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 369 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    370    %finish
_imp_current_line = 370; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 370 "regression-bugs-tmp/SIM.imp"
L_0075:;
                                                                //    371    %unless c==nil %start
_imp_current_line = 371; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 371 "regression-bugs-tmp/SIM.imp"
if (((C) == (NIL))) goto L_007c;
                                                                //    372      printstring(type(c_type)); printstring(" (")
_imp_current_line = 372; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 372 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(TYPE[C->TYPE]);
_imp_current_line = 372; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 372 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal(" ("));
                                                                //    373      p==c_ins
_imp_current_line = 373; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 373 "regression-bugs-tmp/SIM.imp"
P = C->INS;
                                                                //    374      %whilenot p==nil %cycle
_imp_current_line = 374; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 374 "regression-bugs-tmp/SIM.imp"
L_007d:;
#line 374 "regression-bugs-tmp/SIM.imp"
if (((P) == (NIL))) goto L_007e;
                                                                //    375        printstring(p_signal_name); p==p_next; printsymbol(',') %unless p==nil
_imp_current_line = 375; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 375 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(P->SIGNAL-> void /* BUG caused by a pooltostr(0) call? */ );
_imp_current_line = 375; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 375 "regression-bugs-tmp/SIM.imp"
P = P->NEXT;
_imp_current_line = 375; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 375 "regression-bugs-tmp/SIM.imp"
if (((P) == (NIL))) goto L_0080;
#line 375 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSYMBOL(44);
#line 375 "regression-bugs-tmp/SIM.imp"
L_0080:;
                                                                //    376      %repeat
_imp_current_line = 376; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 376 "regression-bugs-tmp/SIM.imp"
goto L_007d;
#line 376 "regression-bugs-tmp/SIM.imp"
L_007e:;
                                                                //    377      printsymbol('/')
_imp_current_line = 377; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 377 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSYMBOL(47);
                                                                //    378      p==c_outs
_imp_current_line = 378; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 378 "regression-bugs-tmp/SIM.imp"
P = C->OUTS;
                                                                //    379      %whilenot p==nil %cycle
_imp_current_line = 379; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 379 "regression-bugs-tmp/SIM.imp"
L_0081:;
#line 379 "regression-bugs-tmp/SIM.imp"
if (((P) == (NIL))) goto L_0082;
                                                                //    380        printstring(p_signal_name); p==p_next; printsymbol(',') %unless p==nil
_imp_current_line = 380; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 380 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(P->SIGNAL-> void /* BUG caused by a pooltostr(0) call? */ );
_imp_current_line = 380; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 380 "regression-bugs-tmp/SIM.imp"
P = P->NEXT;
_imp_current_line = 380; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 380 "regression-bugs-tmp/SIM.imp"
if (((P) == (NIL))) goto L_0084;
#line 380 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSYMBOL(44);
#line 380 "regression-bugs-tmp/SIM.imp"
L_0084:;
                                                                //    381      %repeat
_imp_current_line = 381; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 381 "regression-bugs-tmp/SIM.imp"
goto L_0081;
#line 381 "regression-bugs-tmp/SIM.imp"
L_0082:;
                                                                //    382      printsymbol(')'); newline
_imp_current_line = 382; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 382 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSYMBOL(41);
_imp_current_line = 382; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 382 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    383    %finish
_imp_current_line = 383; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 383 "regression-bugs-tmp/SIM.imp"
L_007c:;
                                                                //    384    %signal 15
_imp_current_line = 384; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 384 "regression-bugs-tmp/SIM.imp"
_imp_signal(15, 0, 0, "");
                                                                //    385  %end
_imp_current_line = 385; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 385 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block FAIL at level 2
                                                                //    386  
                                                                //    387  %routine excite(%record(compf)%name comp)
_imp_current_line = 387; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 387 "regression-bugs-tmp/SIM.imp"
void EXCITE(  COMPF /*name*/*COMP )
#line 387 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    388  %record(pinf)%name in1,in2,more,out
_imp_current_line = 388; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 388 "regression-bugs-tmp/SIM.imp"
 PINF /*name*/*IN1;
#line 388 "regression-bugs-tmp/SIM.imp"
 PINF /*name*/*IN2;
#line 388 "regression-bugs-tmp/SIM.imp"
 PINF /*name*/*MORE;
#line 388 "regression-bugs-tmp/SIM.imp"
 PINF /*name*/*OUT;
                                                                //    389  %integer i1,i2
_imp_current_line = 389; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 389 "regression-bugs-tmp/SIM.imp"
int I1;
#line 389 "regression-bugs-tmp/SIM.imp"
int I2;
                                                                //    390  %switch s(0:known)
_imp_current_line = 390; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 390 "regression-bugs-tmp/SIM.imp"
static int sw1_S_idx;
static const void * /*SWITCH*/ sw1_S[14] = { &&sw1_S_0, &&sw1_S_1, &&sw1_S_2, &&sw1_S_3, &&sw1_S_4, &&sw1_S_5, &&sw1_S_6, &&sw1_S_7, &&sw1_S_8, &&sw1_S_9, &&sw1_S_10, &&sw1_S_11, &&sw1_S_12, &&sw1_S_13,  };
                                                                //    391  %switch t(3:9)
_imp_current_line = 391; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 391 "regression-bugs-tmp/SIM.imp"
static int sw2_T_idx;
static const void * /*SWITCH*/ sw2_T[7] = { &&sw2_T_3, &&sw2_T_4, &&sw2_T_5, &&sw2_T_6, &&sw2_T_7, &&sw2_T_8, &&sw2_T_9,  };
                                                                //    392  
                                                                //    393    more==nil; in2==nil
_imp_current_line = 393; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 393 "regression-bugs-tmp/SIM.imp"
MORE = NIL;
_imp_current_line = 393; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 393 "regression-bugs-tmp/SIM.imp"
IN2 = NIL;
                                                                //    394    in1==comp_ins
_imp_current_line = 394; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 394 "regression-bugs-tmp/SIM.imp"
IN1 = COMP->INS;
                                                                //    395    %unless in1==nil %start
_imp_current_line = 395; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 395 "regression-bugs-tmp/SIM.imp"
if (((IN1) == (NIL))) goto L_0085;
                                                                //    396      i1=in1_state; in2==in1_next
_imp_current_line = 396; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 396 "regression-bugs-tmp/SIM.imp"
I1 = IN1->STATE;
_imp_current_line = 396; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 396 "regression-bugs-tmp/SIM.imp"
IN2 = IN1->NEXT;
                                                                //    397      %unless in2==nil %start
_imp_current_line = 397; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 397 "regression-bugs-tmp/SIM.imp"
if (((IN2) == (NIL))) goto L_0086;
                                                                //    398        more==in2_next; i2=in2_state
_imp_current_line = 398; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 398 "regression-bugs-tmp/SIM.imp"
MORE = IN2->NEXT;
_imp_current_line = 398; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 398 "regression-bugs-tmp/SIM.imp"
I2 = IN2->STATE;
                                                                //    399      %finish
_imp_current_line = 399; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 399 "regression-bugs-tmp/SIM.imp"
L_0086:;
                                                                //    400    %finish
_imp_current_line = 400; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 400 "regression-bugs-tmp/SIM.imp"
L_0085:;
                                                                //    401    out==comp_outs
_imp_current_line = 401; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 401 "regression-bugs-tmp/SIM.imp"
OUT = COMP->OUTS;
                                                                //    402    ->s(comp_type)
_imp_current_line = 402; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 402 "regression-bugs-tmp/SIM.imp"
sw1_S_idx = COMP->TYPE; if ((0 <= sw1_S_idx) && (sw1_S_idx <= 13)) goto *sw1_S[sw1_S_idx]; else {
   /*_imp_signal(8, 2, sw1_S_idx);*/
   fprintf(stderr, "%%SWITCH index S(%d) not in range 0:13 at %s:%d\n",
           sw1_S_idx, (_imp_current_file != 0 ? _imp_current_file : __FILE__),
           (_imp_current_line != 0 ? _imp_current_line : __LINE__));
           exit(1);
}
                                                                //    403  
                                                                //    404  s(9): {xor}    i1=xor(float(i1),float(i2)); ->generic
_imp_current_line = 404; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 404 "regression-bugs-tmp/SIM.imp"
sw1_S_9:;
_imp_current_line = 404; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 404 "regression-bugs-tmp/SIM.imp"
I1 = XOR(FLOAT(I1), FLOAT(I2));
_imp_current_line = 404; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 404 "regression-bugs-tmp/SIM.imp"
goto U_1000;
                                                                //    405  s(3): {and}
_imp_current_line = 405; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 405 "regression-bugs-tmp/SIM.imp"
sw1_S_3:;
                                                                //    406  s(4): {nand}
_imp_current_line = 406; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 406 "regression-bugs-tmp/SIM.imp"
sw1_S_4:;
                                                                //    407  s(5): {nando}  i1=and(float(i1),float(i2)); ->generic
_imp_current_line = 407; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 407 "regression-bugs-tmp/SIM.imp"
sw1_S_5:;
_imp_current_line = 407; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 407 "regression-bugs-tmp/SIM.imp"
I1 = AND(FLOAT(I1), FLOAT(I2));
_imp_current_line = 407; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 407 "regression-bugs-tmp/SIM.imp"
goto U_1000;
                                                                //    408  s(6): {or}
_imp_current_line = 408; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 408 "regression-bugs-tmp/SIM.imp"
sw1_S_6:;
                                                                //    409  s(7): {nor}
_imp_current_line = 409; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 409 "regression-bugs-tmp/SIM.imp"
sw1_S_7:;
                                                                //    410  s(8): {noro}   i1=or(float(i1),float(i2))
_imp_current_line = 410; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 410 "regression-bugs-tmp/SIM.imp"
sw1_S_8:;
_imp_current_line = 410; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 410 "regression-bugs-tmp/SIM.imp"
I1 = OR(FLOAT(I1), FLOAT(I2));
                                                                //    411  generic:
_imp_current_line = 411; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 411 "regression-bugs-tmp/SIM.imp"
U_1000:;
                                                                //    412    ->t(comp_type) %if more==nil
_imp_current_line = 412; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 412 "regression-bugs-tmp/SIM.imp"
if (((MORE) != (NIL))) goto L_0087;
#line 412 "regression-bugs-tmp/SIM.imp"
sw2_T_idx = COMP->TYPE; if ((3 <= sw2_T_idx) && (sw2_T_idx <= 9)) goto *(sw2_T-3)[sw2_T_idx];  /* Bounds=3:9 */ else {
   /*_imp_signal(8, 2, sw2_T_idx);*/
   fprintf(stderr, "%%SWITCH index T(%d) not in range 3:9 at %s:%d\n",
           sw2_T_idx, (_imp_current_file != 0 ? _imp_current_file : __FILE__),
           (_imp_current_line != 0 ? _imp_current_line : __LINE__));
           exit(1);
}
#line 412 "regression-bugs-tmp/SIM.imp"
L_0087:;
                                                                //    413    i2=more_state; more==more_next; ->s(comp_type)
_imp_current_line = 413; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 413 "regression-bugs-tmp/SIM.imp"
I2 = MORE->STATE;
_imp_current_line = 413; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 413 "regression-bugs-tmp/SIM.imp"
MORE = MORE->NEXT;
_imp_current_line = 413; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 413 "regression-bugs-tmp/SIM.imp"
sw1_S_idx = COMP->TYPE; if ((0 <= sw1_S_idx) && (sw1_S_idx <= 13)) goto *sw1_S[sw1_S_idx]; else {
   /*_imp_signal(8, 2, sw1_S_idx);*/
   fprintf(stderr, "%%SWITCH index S(%d) not in range 0:13 at %s:%d\n",
           sw1_S_idx, (_imp_current_file != 0 ? _imp_current_file : __FILE__),
           (_imp_current_line != 0 ? _imp_current_line : __LINE__));
           exit(1);
}
                                                                //    414  
                                                                //    415  t(9): {xor}
_imp_current_line = 415; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 415 "regression-bugs-tmp/SIM.imp"
sw2_T_9:;
                                                                //    416  t(6): {or}
_imp_current_line = 416; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 416 "regression-bugs-tmp/SIM.imp"
sw2_T_6:;
                                                                //    417  t(3): {and}    make(out,i1,now+1); %return
_imp_current_line = 417; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 417 "regression-bugs-tmp/SIM.imp"
sw2_T_3:;
_imp_current_line = 417; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 417 "regression-bugs-tmp/SIM.imp"
MAKE(OUT, I1, (((int)(NOW)) + (1)));
_imp_current_line = 417; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 417 "regression-bugs-tmp/SIM.imp"
return;
                                                                //    418  s(1): {inv}
_imp_current_line = 418; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 418 "regression-bugs-tmp/SIM.imp"
sw1_S_1:;
                                                                //    419  t(7): {nor}
_imp_current_line = 419; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 419 "regression-bugs-tmp/SIM.imp"
sw2_T_7:;
                                                                //    420  t(4): {nand}   make(out,-float(i1),now+1); %return
_imp_current_line = 420; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 420 "regression-bugs-tmp/SIM.imp"
sw2_T_4:;
_imp_current_line = 420; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 420 "regression-bugs-tmp/SIM.imp"
MAKE(OUT, (-(FLOAT(I1))), (((int)(NOW)) + (1)));
_imp_current_line = 420; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 420 "regression-bugs-tmp/SIM.imp"
return;
                                                                //    421  s(2): {invo}
_imp_current_line = 421; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 421 "regression-bugs-tmp/SIM.imp"
sw1_S_2:;
                                                                //    422  t(8): {noro}
_imp_current_line = 422; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 422 "regression-bugs-tmp/SIM.imp"
sw2_T_8:;
                                                                //    423  t(5): {nando}  make(out,oc(-float(i1)),now+1); %return
_imp_current_line = 423; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 423 "regression-bugs-tmp/SIM.imp"
sw2_T_5:;
_imp_current_line = 423; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 423 "regression-bugs-tmp/SIM.imp"
MAKE(OUT, OC((-(FLOAT(I1)))), (((int)(NOW)) + (1)));
_imp_current_line = 423; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 423 "regression-bugs-tmp/SIM.imp"
return;
                                                                //    424  
                                                                //    425  s(10):{u74}
_imp_current_line = 425; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 425 "regression-bugs-tmp/SIM.imp"
sw1_S_10:;
                                                                //    426    %begin
_imp_current_line = 426; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 426 "regression-bugs-tmp/SIM.imp"
void _BLOCK_1_LEVEL_2_(void) {
  __label__ _imp_endofblock;
                                                                //    427    %integer d,s0,r0,c
_imp_current_line = 427; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 427 "regression-bugs-tmp/SIM.imp"
int D;
#line 427 "regression-bugs-tmp/SIM.imp"
int S0;
#line 427 "regression-bugs-tmp/SIM.imp"
int R0;
#line 427 "regression-bugs-tmp/SIM.imp"
int C;
                                                                //    428    %record(pinf)%name out0
_imp_current_line = 428; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 428 "regression-bugs-tmp/SIM.imp"
 PINF /*name*/*OUT0;
                                                                //    429  
                                                                //    430      d=setupfloat(i1); s0=float(i2); r0=float(more_state)
_imp_current_line = 430; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 430 "regression-bugs-tmp/SIM.imp"
D = SETUPFLOAT(I1);
_imp_current_line = 430; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 430 "regression-bugs-tmp/SIM.imp"
S0 = FLOAT(I2);
_imp_current_line = 430; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 430 "regression-bugs-tmp/SIM.imp"
R0 = FLOAT(MORE->STATE);
                                                                //    431      c=edgefloat(more_next_state)
_imp_current_line = 431; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 431 "regression-bugs-tmp/SIM.imp"
C = EDGEFLOAT(MORE->NEXT->STATE);
                                                                //    432      out0==out_next
_imp_current_line = 432; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 432 "regression-bugs-tmp/SIM.imp"
OUT0 = OUT->NEXT;
                                                                //    433  
                                                                //    434      %if r0=undef %start
_imp_current_line = 434; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 434 "regression-bugs-tmp/SIM.imp"
if (((R0) != ((-2147483648)))) goto L_0088;
                                                                //    435        make(out,high,now+1) %if s0=low
_imp_current_line = 435; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 435 "regression-bugs-tmp/SIM.imp"
if (((S0) != ((-2)))) goto L_0089;
#line 435 "regression-bugs-tmp/SIM.imp"
MAKE(OUT, 2, (((int)(NOW)) + (1)));
#line 435 "regression-bugs-tmp/SIM.imp"
L_0089:;
                                                                //    436      %finishelseif s0=undef %start
_imp_current_line = 436; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 436 "regression-bugs-tmp/SIM.imp"
goto L_008a;
#line 436 "regression-bugs-tmp/SIM.imp"
L_0088:;
#line 436 "regression-bugs-tmp/SIM.imp"
if (((S0) != ((-2147483648)))) goto L_008b;
                                                                //    437        make(out0,high,now+1) %if r0=low
_imp_current_line = 437; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 437 "regression-bugs-tmp/SIM.imp"
if (((R0) != ((-2)))) goto L_008c;
#line 437 "regression-bugs-tmp/SIM.imp"
MAKE(OUT0, 2, (((int)(NOW)) + (1)));
#line 437 "regression-bugs-tmp/SIM.imp"
L_008c:;
                                                                //    438      %finishelseif r0=low %and s0=low %start
_imp_current_line = 438; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 438 "regression-bugs-tmp/SIM.imp"
goto L_008a;
#line 438 "regression-bugs-tmp/SIM.imp"
L_008b:;
#line 438 "regression-bugs-tmp/SIM.imp"
if (((R0) != ((-2)))) goto L_008d;
#line 438 "regression-bugs-tmp/SIM.imp"
if (((S0) != ((-2)))) goto L_008d;
                                                                //    439        make(out,high,now+1); make(out0,high,now+1)
_imp_current_line = 439; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 439 "regression-bugs-tmp/SIM.imp"
MAKE(OUT, 2, (((int)(NOW)) + (1)));
_imp_current_line = 439; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 439 "regression-bugs-tmp/SIM.imp"
MAKE(OUT0, 2, (((int)(NOW)) + (1)));
                                                                //    440      %finishelseif r0=low %start
_imp_current_line = 440; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 440 "regression-bugs-tmp/SIM.imp"
goto L_008a;
#line 440 "regression-bugs-tmp/SIM.imp"
L_008d:;
#line 440 "regression-bugs-tmp/SIM.imp"
if (((R0) != ((-2)))) goto L_008e;
                                                                //    441        make(out,low,now+1); make(out0,high,now+1)
_imp_current_line = 441; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 441 "regression-bugs-tmp/SIM.imp"
MAKE(OUT, (-2), (((int)(NOW)) + (1)));
_imp_current_line = 441; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 441 "regression-bugs-tmp/SIM.imp"
MAKE(OUT0, 2, (((int)(NOW)) + (1)));
                                                                //    442      %finishelseif s0=low %start
_imp_current_line = 442; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 442 "regression-bugs-tmp/SIM.imp"
goto L_008a;
#line 442 "regression-bugs-tmp/SIM.imp"
L_008e:;
#line 442 "regression-bugs-tmp/SIM.imp"
if (((S0) != ((-2)))) goto L_008f;
                                                                //    443        make(out,high,now+1); make(out0,low,now+1)
_imp_current_line = 443; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 443 "regression-bugs-tmp/SIM.imp"
MAKE(OUT, 2, (((int)(NOW)) + (1)));
_imp_current_line = 443; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 443 "regression-bugs-tmp/SIM.imp"
MAKE(OUT0, (-2), (((int)(NOW)) + (1)));
                                                                //    444        %if c=rising %and (d=low %or d=undef) %start
_imp_current_line = 444; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 444 "regression-bugs-tmp/SIM.imp"
if (((C) != (1))) goto L_0090;
#line 444 "regression-bugs-tmp/SIM.imp"
if (((D) == ((-2)))) goto L_0083;
#line 444 "regression-bugs-tmp/SIM.imp"
if (((D) != ((-2147483648)))) goto L_0090;
#line 444 "regression-bugs-tmp/SIM.imp"
L_0083:;
                                                                //    445          make(out0,-d,now+2); make(out0,low,now+3)
_imp_current_line = 445; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 445 "regression-bugs-tmp/SIM.imp"
MAKE(OUT0, (-(D)), (((int)(NOW)) + (2)));
_imp_current_line = 445; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 445 "regression-bugs-tmp/SIM.imp"
MAKE(OUT0, (-2), (((int)(NOW)) + (3)));
                                                                //    446        %finish
_imp_current_line = 446; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 446 "regression-bugs-tmp/SIM.imp"
L_0090:;
                                                                //    447      %finishelseif c=rising %start
_imp_current_line = 447; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 447 "regression-bugs-tmp/SIM.imp"
goto L_008a;
#line 447 "regression-bugs-tmp/SIM.imp"
L_008f:;
#line 447 "regression-bugs-tmp/SIM.imp"
if (((C) != (1))) goto L_0091;
                                                                //    448        make(out,d,now+2); make(out0,-d,now+2)
_imp_current_line = 448; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 448 "regression-bugs-tmp/SIM.imp"
MAKE(OUT, D, (((int)(NOW)) + (2)));
_imp_current_line = 448; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 448 "regression-bugs-tmp/SIM.imp"
MAKE(OUT0, (-(D)), (((int)(NOW)) + (2)));
                                                                //    449      %finish
_imp_current_line = 449; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 449 "regression-bugs-tmp/SIM.imp"
L_0091:;
#line 449 "regression-bugs-tmp/SIM.imp"
L_008a:;
                                                                //    450    %end
_imp_current_line = 450; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 450 "regression-bugs-tmp/SIM.imp"
goto _imp_endofblock;
_imp_endofblock: ;
} // End of block _BLOCK_1_LEVEL_2_ at level 3
_BLOCK_1_LEVEL_2_();
                                                                //    451    %return
_imp_current_line = 451; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 451 "regression-bugs-tmp/SIM.imp"
return;
                                                                //    452  
                                                                //    453  s(11): {tsbuf: non-inverting, low-active enable}
_imp_current_line = 453; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 453 "regression-bugs-tmp/SIM.imp"
sw1_S_11:;
                                                                //    454    i1=float(i1); i2=float(i2)
_imp_current_line = 454; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 454 "regression-bugs-tmp/SIM.imp"
I1 = FLOAT(I1);
_imp_current_line = 454; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 454 "regression-bugs-tmp/SIM.imp"
I2 = FLOAT(I2);
                                                                //    455    %if i2=low %then i2=i1 %elsec
_imp_current_line = 455; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 455 "regression-bugs-tmp/SIM.imp"
if (((I2) != ((-2)))) goto L_0092;
#line 455 "regression-bugs-tmp/SIM.imp"
I2 = I1;
#line 455 "regression-bugs-tmp/SIM.imp"
goto L_0093;
#line 455 "regression-bugs-tmp/SIM.imp"
L_0092:;
#line 455 "regression-bugs-tmp/SIM.imp"
if (((I2) != (2))) goto L_0094;
#line 455 "regression-bugs-tmp/SIM.imp"
I2 = 0;
#line 455 "regression-bugs-tmp/SIM.imp"
goto L_0093;
#line 455 "regression-bugs-tmp/SIM.imp"
L_0094:;
#line 455 "regression-bugs-tmp/SIM.imp"
I2 = (-2147483648);
#line 455 "regression-bugs-tmp/SIM.imp"
L_0093:;
                                                                //    456    %if i2=high %then i2=open %else i2=undef
                                                                //    457    make(out,i2,now+1)
_imp_current_line = 457; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 457 "regression-bugs-tmp/SIM.imp"
MAKE(OUT, I2, (((int)(NOW)) + (1)));
                                                                //    458    %return
_imp_current_line = 458; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 458 "regression-bugs-tmp/SIM.imp"
return;
                                                                //    459  
                                                                //    460  s(12): {u374: clock, enable\ i(0:7) / o(0:7)}
_imp_current_line = 460; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 460 "regression-bugs-tmp/SIM.imp"
sw1_S_12:;
                                                                //    461  !%begin
                                                                //    462  !%record(pinf)%namearray in,state,out(0:7)
                                                                //    463  !%record(pinf)%name p
                                                                //    464  !%integer i
                                                                //    465  !  p==comp_private
                                                                //    466  !  %if p==nil %start
                                                                //    467  !    %for i=0,1,7 %cycle
                                                                //    468  !      p==newpin; state(i)==p; p_comp==comp
                                                                //    469  !    %repeat
                                                                //    470  !    comp_private==state(0)
                                                                //    471  !    %for i=0,1,6 %cycle
                                                                //    472  !      state(i)_next==state(i+1)
                                                                //    473  !    %repeat
                                                                //    474  !    state(7)_next==nil
                                                                //    475  !  %finishelsestart
                                                                //    476  !    %for i=0,1,7 %cycle
                                                                //    477  !      state(i)==p; p==p_next
                                                                //    478  !    %repeat
                                                                //    479  !  %finish
                                                                //    480  !  p==comp_outs
                                                                //    481  !  %for i=0,1,7 %cycle
                                                                //    482  !    out(i)==p; p==p_next
                                                                //    483  !  %repeat
                                                                //    484  !  p==more
                                                                //    485  !  %for i=0,1,7 %cycle
                                                                //    486  !    in(i)==p; p==p_next
                                                                //    487  !  %repeat
                                                                //    488  !  %if i1=rising %start
                                                                //    489  !    state(i)_state=setupfloat(in(i)_state) %for i=0,1,7
                                                                //    490  !  %finish
                                                                //    491  !  i2=float(i2)
                                                                //    492  !  %if i2=low %start
                                                                //    493  !    make(out(i),state(i)_state,now+1) %for i=0,1,7
                                                                //    494  !  %finishelsestart
                                                                //    495  !    %if i2=high %then i2=open %else i2=undef
                                                                //    496  !    make(out(i),i2,now+1) %for i=0,1,7
                                                                //    497  !  %finish
                                                                //    498  !%end
                                                                //    499    %return
_imp_current_line = 499; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 499 "regression-bugs-tmp/SIM.imp"
return;
                                                                //    500  
                                                                //    501  s(13): {u123: a0, b, c0, timeout / q, q0}
_imp_current_line = 501; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 501 "regression-bugs-tmp/SIM.imp"
sw1_S_13:;
                                                                //    502    %begin
_imp_current_line = 502; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 502 "regression-bugs-tmp/SIM.imp"
void _BLOCK_2_LEVEL_2_(void) {
  __label__ _imp_endofblock;
                                                                //    503   %integer a0,b,c0,timeout
_imp_current_line = 503; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 503 "regression-bugs-tmp/SIM.imp"
int A0;
#line 503 "regression-bugs-tmp/SIM.imp"
int B;
#line 503 "regression-bugs-tmp/SIM.imp"
int C0;
#line 503 "regression-bugs-tmp/SIM.imp"
int TIMEOUT;
                                                                //    504    %record(pinf)%name out0
_imp_current_line = 504; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 504 "regression-bugs-tmp/SIM.imp"
 PINF /*name*/*OUT0;
                                                                //    505    a0=float(i1); b=float(i2); c0=float(more_state)
_imp_current_line = 505; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 505 "regression-bugs-tmp/SIM.imp"
A0 = FLOAT(I1);
_imp_current_line = 505; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 505 "regression-bugs-tmp/SIM.imp"
B = FLOAT(I2);
_imp_current_line = 505; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 505 "regression-bugs-tmp/SIM.imp"
C0 = FLOAT(MORE->STATE);
                                                                //    506    timeout=more_next_state
_imp_current_line = 506; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 506 "regression-bugs-tmp/SIM.imp"
TIMEOUT = MORE->NEXT->STATE;
                                                                //    507    out0==out_next
_imp_current_line = 507; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 507 "regression-bugs-tmp/SIM.imp"
OUT0 = OUT->NEXT;
                                                                //    508    %if c0=low %start
_imp_current_line = 508; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 508 "regression-bugs-tmp/SIM.imp"
if (((C0) != ((-2)))) goto L_0095;
                                                                //    509      make(out,low,now+1); make(out0,high,now+1)
_imp_current_line = 509; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 509 "regression-bugs-tmp/SIM.imp"
MAKE(OUT, (-2), (((int)(NOW)) + (1)));
_imp_current_line = 509; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 509 "regression-bugs-tmp/SIM.imp"
MAKE(OUT0, 2, (((int)(NOW)) + (1)));
                                                                //    510    %finishelseif c0=undef %start
_imp_current_line = 510; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 510 "regression-bugs-tmp/SIM.imp"
goto L_0096;
#line 510 "regression-bugs-tmp/SIM.imp"
L_0095:;
#line 510 "regression-bugs-tmp/SIM.imp"
if (((C0) != ((-2147483648)))) goto L_0097;
                                                                //    511      make(out,undef,now+1); make(out0,undef,now+1)
_imp_current_line = 511; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 511 "regression-bugs-tmp/SIM.imp"
MAKE(OUT, (-2147483648), (((int)(NOW)) + (1)));
_imp_current_line = 511; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 511 "regression-bugs-tmp/SIM.imp"
MAKE(OUT0, (-2147483648), (((int)(NOW)) + (1)));
                                                                //    512    %finishelsestart
_imp_current_line = 512; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 512 "regression-bugs-tmp/SIM.imp"
goto L_0096;
#line 512 "regression-bugs-tmp/SIM.imp"
L_0097:;
                                                                //    513      b=and(-a0,b)
_imp_current_line = 513; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 513 "regression-bugs-tmp/SIM.imp"
B = AND((-(A0)), B);
                                                                //    514      %if b=high %and out_state=low %start
_imp_current_line = 514; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 514 "regression-bugs-tmp/SIM.imp"
if (((B) != (2))) goto L_0098;
#line 514 "regression-bugs-tmp/SIM.imp"
if (((OUT->STATE) != ((-2)))) goto L_0098;
                                                                //    515        make(out,high,now+1)
_imp_current_line = 515; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 515 "regression-bugs-tmp/SIM.imp"
MAKE(OUT, 2, (((int)(NOW)) + (1)));
                                                                //    516        make(out0,low,now+1)
_imp_current_line = 516; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 516 "regression-bugs-tmp/SIM.imp"
MAKE(OUT0, (-2), (((int)(NOW)) + (1)));
                                                                //    517      %finishelseif |timeout|=rising %start
_imp_current_line = 517; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 517 "regression-bugs-tmp/SIM.imp"
goto L_0099;
#line 517 "regression-bugs-tmp/SIM.imp"
L_0098:;
#line 517 "regression-bugs-tmp/SIM.imp"
if (((_imp_IMOD(TIMEOUT)) != (1))) goto L_009a;
                                                                //    518        make(out,low,now+1)
_imp_current_line = 518; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 518 "regression-bugs-tmp/SIM.imp"
MAKE(OUT, (-2), (((int)(NOW)) + (1)));
                                                                //    519        make(out0,high,now+1)
_imp_current_line = 519; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 519 "regression-bugs-tmp/SIM.imp"
MAKE(OUT0, 2, (((int)(NOW)) + (1)));
                                                                //    520      %finish
_imp_current_line = 520; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 520 "regression-bugs-tmp/SIM.imp"
L_009a:;
#line 520 "regression-bugs-tmp/SIM.imp"
L_0099:;
                                                                //    521    %finish
_imp_current_line = 521; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 521 "regression-bugs-tmp/SIM.imp"
L_0096:;
                                                                //    522    %end
_imp_current_line = 522; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 522 "regression-bugs-tmp/SIM.imp"
goto _imp_endofblock;
_imp_endofblock: ;
} // End of block _BLOCK_2_LEVEL_2_ at level 3
_BLOCK_2_LEVEL_2_();
                                                                //    523    %return
_imp_current_line = 523; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 523 "regression-bugs-tmp/SIM.imp"
return;
                                                                //    524  
                                                                //    525  s(0):
_imp_current_line = 525; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 525 "regression-bugs-tmp/SIM.imp"
sw1_S_0:;
                                                                //    526  %end
_imp_current_line = 526; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 526 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block EXCITE at level 2
                                                                //    527  
                                                                //    528  %string(15)atom,pend=""
_imp_current_line = 528; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 528 "regression-bugs-tmp/SIM.imp"
_imp_string /*%string(15)*/ ATOM;
#line 528 "regression-bugs-tmp/SIM.imp"
_imp_string /*%string(15)*/ PEND;
#line 528 "regression-bugs-tmp/SIM.imp"
PEND = _imp_str_literal("");
                                                                //    529  %integer sym=nl
_imp_current_line = 529; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 529 "regression-bugs-tmp/SIM.imp"
int SYM;
#line 529 "regression-bugs-tmp/SIM.imp"
SYM = 10;
                                                                //    530  %constbyteintegerarray symtype(0:127)=
_imp_current_line = 530; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 530 "regression-bugs-tmp/SIM.imp"
const unsigned char SYMTYPE[128] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 2, 0, 0, 0, 2, 2, 0, 0, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0,  };
                                                                //    531  1(33),0(3),2,0(3),2,2,0,0,2,2,0,2,0(16),0(33),3(26),0(5)
                                                                //    532  !          $      ( )     , -   /
                                                                //    533  ! 0 normal 1 separator 2 special 3 lower-case
                                                                //    534  
                                                                //    535  %routine readatom
_imp_current_line = 535; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 535 "regression-bugs-tmp/SIM.imp"
void READATOM( void )
#line 535 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    536  %integer st
_imp_current_line = 536; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 536 "regression-bugs-tmp/SIM.imp"
int ST;
                                                                //    537    %unless pend="" %start
_imp_current_line = 537; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 537 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(PEND, _imp_str_literal("")) == 0)) goto L_009b;
                                                                //    538      atom=pend; pend=""; %return
_imp_current_line = 538; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 538 "regression-bugs-tmp/SIM.imp"
ATOM = PEND;
_imp_current_line = 538; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 538 "regression-bugs-tmp/SIM.imp"
PEND = _imp_str_literal("");
_imp_current_line = 538; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 538 "regression-bugs-tmp/SIM.imp"
return;
                                                                //    539    %finish
_imp_current_line = 539; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 539 "regression-bugs-tmp/SIM.imp"
L_009b:;
                                                                //    540    %cycle
_imp_current_line = 540; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 540 "regression-bugs-tmp/SIM.imp"
L_009c:;
                                                                //    541      %cycle
_imp_current_line = 541; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 541 "regression-bugs-tmp/SIM.imp"
L_009f:;
                                                                //    542        st=symtype(sym&127); %exitunless st=1
_imp_current_line = 542; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 542 "regression-bugs-tmp/SIM.imp"
ST = SYMTYPE[((SYM) & (127))];
_imp_current_line = 542; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 542 "regression-bugs-tmp/SIM.imp"
if (((ST) == (1))) goto L_00a2;
#line 542 "regression-bugs-tmp/SIM.imp"
goto L_00a0;
#line 542 "regression-bugs-tmp/SIM.imp"
L_00a2:;
                                                                //    543        readsymbol(sym)
_imp_current_line = 543; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 543 "regression-bugs-tmp/SIM.imp"
_imp_READSYMBOL(&SYM);
                                                                //    544      %repeat
_imp_current_line = 544; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 544 "regression-bugs-tmp/SIM.imp"
goto L_009f;
#line 544 "regression-bugs-tmp/SIM.imp"
L_00a0:;
                                                                //    545      %exitunless sym='$'
_imp_current_line = 545; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 545 "regression-bugs-tmp/SIM.imp"
if (((SYM) == (36))) goto L_00a3;
#line 545 "regression-bugs-tmp/SIM.imp"
goto L_009d;
#line 545 "regression-bugs-tmp/SIM.imp"
L_00a3:;
                                                                //    546      readsymbol(sym) %until sym='$' %or sym=nl
_imp_current_line = 546; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 546 "regression-bugs-tmp/SIM.imp"
L_00a4:;
#line 546 "regression-bugs-tmp/SIM.imp"
_imp_READSYMBOL(&SYM);
#line 546 "regression-bugs-tmp/SIM.imp"
if (((SYM) == (36))) goto L_00a5;
#line 546 "regression-bugs-tmp/SIM.imp"
if (((SYM) == (10))) goto L_00a5;
#line 546 "regression-bugs-tmp/SIM.imp"
goto L_00a4;
#line 546 "regression-bugs-tmp/SIM.imp"
L_00a5:;
                                                                //    547      readsymbol(sym)
_imp_current_line = 547; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 547 "regression-bugs-tmp/SIM.imp"
_imp_READSYMBOL(&SYM);
                                                                //    548    %repeat
_imp_current_line = 548; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 548 "regression-bugs-tmp/SIM.imp"
goto L_009c;
#line 548 "regression-bugs-tmp/SIM.imp"
L_009d:;
                                                                //    549    sym=sym-32 %if st=3
_imp_current_line = 549; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 549 "regression-bugs-tmp/SIM.imp"
if (((ST) != (3))) goto L_00a7;
#line 549 "regression-bugs-tmp/SIM.imp"
SYM = (((int)(SYM)) - (32));
#line 549 "regression-bugs-tmp/SIM.imp"
L_00a7:;
                                                                //    550    atom=tostring(sym)
_imp_current_line = 550; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 550 "regression-bugs-tmp/SIM.imp"
ATOM = _imp_TOSTRING(SYM);
                                                                //    551    %if st=2 %start; !Special on its own
_imp_current_line = 551; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 551 "regression-bugs-tmp/SIM.imp"
if (((ST) != (2))) goto L_00a8;
                                                                //    552      %if sym='-' %start; ! "->" or "/" or "-" equivalent
_imp_current_line = 552; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 552 "regression-bugs-tmp/SIM.imp"
if (((SYM) != (45))) goto L_00a9;
                                                                //    553        atom="/"
_imp_current_line = 553; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 553 "regression-bugs-tmp/SIM.imp"
ATOM = _imp_str_literal("/");
                                                                //    554        readsymbol(sym); %returnunless sym='>'
_imp_current_line = 554; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 554 "regression-bugs-tmp/SIM.imp"
_imp_READSYMBOL(&SYM);
_imp_current_line = 554; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 554 "regression-bugs-tmp/SIM.imp"
if (((SYM) == (62))) goto L_00aa;
#line 554 "regression-bugs-tmp/SIM.imp"
return;
#line 554 "regression-bugs-tmp/SIM.imp"
L_00aa:;
                                                                //    555      %finish
_imp_current_line = 555; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 555 "regression-bugs-tmp/SIM.imp"
L_00a9:;
                                                                //    556      readsymbol(sym); %return
_imp_current_line = 556; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 556 "regression-bugs-tmp/SIM.imp"
_imp_READSYMBOL(&SYM);
_imp_current_line = 556; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 556 "regression-bugs-tmp/SIM.imp"
return;
                                                                //    557    %finish
_imp_current_line = 557; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 557 "regression-bugs-tmp/SIM.imp"
L_00a8:;
                                                                //    558    readsymbol(sym)
_imp_current_line = 558; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 558 "regression-bugs-tmp/SIM.imp"
_imp_READSYMBOL(&SYM);
                                                                //    559    %cycle
_imp_current_line = 559; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 559 "regression-bugs-tmp/SIM.imp"
L_00ab:;
                                                                //    560      st=symtype(sym&127); sym=sym-32 %and st=0 %if st=3
_imp_current_line = 560; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 560 "regression-bugs-tmp/SIM.imp"
ST = SYMTYPE[((SYM) & (127))];
_imp_current_line = 560; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 560 "regression-bugs-tmp/SIM.imp"
if (((ST) != (3))) goto L_00ae;
#line 560 "regression-bugs-tmp/SIM.imp"
SYM = (((int)(SYM)) - (32));
#line 560 "regression-bugs-tmp/SIM.imp"
ST = 0;
#line 560 "regression-bugs-tmp/SIM.imp"
L_00ae:;
                                                                //    561      %exitunless st=0
_imp_current_line = 561; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 561 "regression-bugs-tmp/SIM.imp"
if (((ST) == (0))) goto L_00af;
#line 561 "regression-bugs-tmp/SIM.imp"
goto L_00ac;
#line 561 "regression-bugs-tmp/SIM.imp"
L_00af:;
                                                                //    562      atom=atom.tostring(sym) %unless length(atom)=15
_imp_current_line = 562; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 562 "regression-bugs-tmp/SIM.imp"
if (((*_imp_LENGTH(&ATOM)) == (15))) goto L_00b0;
#line 562 "regression-bugs-tmp/SIM.imp"
ATOM = _imp_join((_imp_string)ATOM,(_imp_string)_imp_TOSTRING(SYM));
#line 562 "regression-bugs-tmp/SIM.imp"
L_00b0:;
                                                                //    563      readsymbol(sym)
_imp_current_line = 563; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 563 "regression-bugs-tmp/SIM.imp"
_imp_READSYMBOL(&SYM);
                                                                //    564    %repeat
_imp_current_line = 564; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 564 "regression-bugs-tmp/SIM.imp"
goto L_00ab;
#line 564 "regression-bugs-tmp/SIM.imp"
L_00ac:;
                                                                //    565  %end
_imp_current_line = 565; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 565 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block READATOM at level 2
                                                                //    566  
                                                                //    567  %record(sigf)%map findsignal
_imp_current_line = 567; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 567 "regression-bugs-tmp/SIM.imp"
 SIGF /*map*/*FINDSIGNAL( void )
#line 567 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    568  %record(sigf)%name s
_imp_current_line = 568; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 568 "regression-bugs-tmp/SIM.imp"
 SIGF /*name*/*S;
                                                                //    569    s==nets
_imp_current_line = 569; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 569 "regression-bugs-tmp/SIM.imp"
S = NETS;
                                                                //    570    %whilenot s==nil %cycle
_imp_current_line = 570; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 570 "regression-bugs-tmp/SIM.imp"
L_00b1:;
#line 570 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_00b2;
                                                                //    571      %result==s %if s_name=atom
_imp_current_line = 571; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 571 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(S->NAME, ATOM) != 0)) goto L_00b4;
#line 571 "regression-bugs-tmp/SIM.imp"
return S;
#line 571 "regression-bugs-tmp/SIM.imp"
L_00b4:;
                                                                //    572      s==s_next
_imp_current_line = 572; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 572 "regression-bugs-tmp/SIM.imp"
S = S->NEXT;
                                                                //    573    %repeat
_imp_current_line = 573; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 573 "regression-bugs-tmp/SIM.imp"
goto L_00b1;
#line 573 "regression-bugs-tmp/SIM.imp"
L_00b2:;
                                                                //    574    s==newsignal; s_next==nets; nets==s; s_name=atom
_imp_current_line = 574; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 574 "regression-bugs-tmp/SIM.imp"
S = NEWSIGNAL();
_imp_current_line = 574; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 574 "regression-bugs-tmp/SIM.imp"
S->NEXT = NETS;
_imp_current_line = 574; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 574 "regression-bugs-tmp/SIM.imp"
NETS = S;
_imp_current_line = 574; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 574 "regression-bugs-tmp/SIM.imp"
S->NAME = ATOM;
                                                                //    575    %result==s
_imp_current_line = 575; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 575 "regression-bugs-tmp/SIM.imp"
return S;
                                                                //    576  %end
_imp_current_line = 576; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 576 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block FINDSIGNAL at level 2
                                                                //    577  
                                                                //    578  %routine readcomponent
_imp_current_line = 578; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 578 "regression-bugs-tmp/SIM.imp"
void READCOMPONENT( void )
#line 578 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    579  %record(compf)%name c
_imp_current_line = 579; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 579 "regression-bugs-tmp/SIM.imp"
 COMPF /*name*/*C;
                                                                //    580  %record(pinf)%name p,plist
_imp_current_line = 580; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 580 "regression-bugs-tmp/SIM.imp"
 PINF /*name*/*P;
#line 580 "regression-bugs-tmp/SIM.imp"
 PINF /*name*/*PLIST;
                                                                //    581  %record(sigf)%name s
_imp_current_line = 581; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 581 "regression-bugs-tmp/SIM.imp"
 SIGF /*name*/*S;
                                                                //    582  %integer t,slashes
_imp_current_line = 582; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 582 "regression-bugs-tmp/SIM.imp"
int T;
#line 582 "regression-bugs-tmp/SIM.imp"
int SLASHES;
                                                                //    583  
                                                                //    584  %record(pinf)%map reverse(%record(pinf)%name this)
_imp_current_line = 584; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 584 "regression-bugs-tmp/SIM.imp"
 PINF /*map*/*REVERSE(  PINF /*name*/*THIS )
#line 584 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    585  %record(pinf)%name tail,next
_imp_current_line = 585; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 585 "regression-bugs-tmp/SIM.imp"
 PINF /*name*/*TAIL;
#line 585 "regression-bugs-tmp/SIM.imp"
 PINF /*name*/*NEXT;
                                                                //    586    tail==nil; %result==nil %if this==nil
_imp_current_line = 586; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 586 "regression-bugs-tmp/SIM.imp"
TAIL = NIL;
_imp_current_line = 586; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 586 "regression-bugs-tmp/SIM.imp"
if (((THIS) != (NIL))) goto L_00b5;
#line 586 "regression-bugs-tmp/SIM.imp"
return NIL;
#line 586 "regression-bugs-tmp/SIM.imp"
L_00b5:;
                                                                //    587    %cycle
_imp_current_line = 587; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 587 "regression-bugs-tmp/SIM.imp"
L_00b6:;
                                                                //    588      next==this_next; this_next==tail; tail==this
_imp_current_line = 588; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 588 "regression-bugs-tmp/SIM.imp"
NEXT = THIS->NEXT;
_imp_current_line = 588; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 588 "regression-bugs-tmp/SIM.imp"
THIS->NEXT = TAIL;
_imp_current_line = 588; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 588 "regression-bugs-tmp/SIM.imp"
TAIL = THIS;
                                                                //    589      %result==this %if next==nil; this==next
_imp_current_line = 589; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 589 "regression-bugs-tmp/SIM.imp"
if (((NEXT) != (NIL))) goto L_00b9;
#line 589 "regression-bugs-tmp/SIM.imp"
return THIS;
#line 589 "regression-bugs-tmp/SIM.imp"
L_00b9:;
_imp_current_line = 589; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 589 "regression-bugs-tmp/SIM.imp"
THIS = NEXT;
                                                                //    590    %repeat
_imp_current_line = 590; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 590 "regression-bugs-tmp/SIM.imp"
goto L_00b6;
                                                                //    591  %end
_imp_current_line = 591; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 591 "regression-bugs-tmp/SIM.imp"
_imp_endofblock: ;
} // End of block REVERSE at level 3
                                                                //    592  
                                                                //    593  !%record(pinf)%map reversecopy(%record(pinf)%name list)
                                                                //    594  !%record(pinf)%name x,y
                                                                //    595  !  x==nil
                                                                //    596  !  %cycle
                                                                //    597  !    %result==x %if list==nil
                                                                //    598  !    y==newpin; y_next==x; x==y
                                                                //    599  !    y_comp==c; y_signal==list_signal
                                                                //    600  !    list==list_next
                                                                //    601  !  %repeat
                                                                //    602  !%end
                                                                //    603  !
                                                                //    604  !%record(pinf)%map append(%record(pinf)%name tail,list)
                                                                //    605  !%record(pinf)%name p
                                                                //    606  !  %result==tail %if list==nil
                                                                //    607  !  p==list; p==p_next %whilenot p_next==nil; p_next==tail
                                                                //    608  !  %result==list
                                                                //    609  !%end
                                                                //    610  
                                                                //    611    readatom; %signal 9 %if atom="END"
_imp_current_line = 611; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 611 "regression-bugs-tmp/SIM.imp"
READATOM();
_imp_current_line = 611; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 611 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal("END")) != 0)) goto L_00b7;
#line 611 "regression-bugs-tmp/SIM.imp"
_imp_signal(9, 0, 0, "");
#line 611 "regression-bugs-tmp/SIM.imp"
L_00b7:;
                                                                //    612    %for t=1,1,known %cycle
_imp_current_line = 612; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 612 "regression-bugs-tmp/SIM.imp"
T = 0;
if ((((13)-(1)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle T = 1, 1, 13");
L_00ba:;
if (T == 13) goto L_00bb;
T += 1;
                                                                //    613      ->ok %if type(t)=atom
_imp_current_line = 613; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 613 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(TYPE[T], ATOM) != 0)) goto L_00bd;
#line 613 "regression-bugs-tmp/SIM.imp"
goto U_1001;
#line 613 "regression-bugs-tmp/SIM.imp"
L_00bd:;
                                                                //    614    %repeat
_imp_current_line = 614; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 614 "regression-bugs-tmp/SIM.imp"
goto L_00ba;
#line 614 "regression-bugs-tmp/SIM.imp"
L_00bb:;
                                                                //    615    printstring("Unknown component "); printstring(atom); newline
_imp_current_line = 615; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 615 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal("Unknown component "));
_imp_current_line = 615; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 615 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(ATOM);
_imp_current_line = 615; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 615 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    616    t=0
_imp_current_line = 616; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 616 "regression-bugs-tmp/SIM.imp"
T = 0;
                                                                //    617  ok: c==newcomp; c_type=t
_imp_current_line = 617; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 617 "regression-bugs-tmp/SIM.imp"
U_1001:;
_imp_current_line = 617; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 617 "regression-bugs-tmp/SIM.imp"
C = NEWCOMP();
_imp_current_line = 617; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 617 "regression-bugs-tmp/SIM.imp"
C->TYPE = T;
                                                                //    618    c_next==components; components==c
_imp_current_line = 618; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 618 "regression-bugs-tmp/SIM.imp"
C->NEXT = COMPONENTS;
_imp_current_line = 618; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 618 "regression-bugs-tmp/SIM.imp"
COMPONENTS = C;
                                                                //    619    slashes=0; plist==nil
_imp_current_line = 619; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 619 "regression-bugs-tmp/SIM.imp"
SLASHES = 0;
_imp_current_line = 619; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 619 "regression-bugs-tmp/SIM.imp"
PLIST = NIL;
                                                                //    620    readatom
_imp_current_line = 620; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 620 "regression-bugs-tmp/SIM.imp"
READATOM();
                                                                //    621    printstring("( expected") %and newline %unless atom="("
_imp_current_line = 621; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 621 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal("(")) == 0)) goto L_00be;
#line 621 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal("( expected"));
#line 621 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
#line 621 "regression-bugs-tmp/SIM.imp"
L_00be:;
                                                                //    622  !Non-ESDL-compatible notation:  comp(ins{{/inouts}/outs})
                                                                //    623  !  readatom
                                                                //    624  !  %cycle
                                                                //    625  !    %if atom="/" %or atom=")" %start
                                                                //    626  !      %if slashes=0 %start
                                                                //    627  !        c_ins==reverse(plist); %exitif atom=")"
                                                                //    628  !        slashes=1
                                                                //    629  !      %finishelsestart
                                                                //    630  !        %if atom=")" %start
                                                                //    631  !          c_outs==append(reverse(plist),c_outs); %exit
                                                                //    632  !        %finish
                                                                //    633  !        c_ins==append(reversecopy(plist),c_ins)
                                                                //    634  !        c_outs==reverse(plist)
                                                                //    635  !      %finish
                                                                //    636  !      plist==nil
                                                                //    637  !      readatom
                                                                //    638  !    %finishelsestart
                                                                //    639  !      printstring("Unexpected (") %and newline %if atom="("
                                                                //    640  !      printstring("Unexpected ,") %and newline %if atom=","
                                                                //    641  !      s==nil; s==findsignal %unless atom="?"
                                                                //    642  !      p==newpin; p_next==plist; plist==p
                                                                //    643  !      p_comp==c; p_signal==s; p_state=open %if s==nil
                                                                //    644  !      readatom
                                                                //    645  !      %if atom="," %then readatom %elsestart
                                                                //    646  !        printstring(", expected") %and newline %unless atom="/" %or atom=")"
                                                                //    647  !      %finish
                                                                //    648  !    %finish
                                                                //    649  !  %repeat
                                                                //    650  !ESDL-compatible notation: comp(ins)->outs
                                                                //    651  ! This requires pending atom and disallows inouts
                                                                //    652    %cycle
_imp_current_line = 652; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 652 "regression-bugs-tmp/SIM.imp"
L_00bf:;
                                                                //    653      readatom
_imp_current_line = 653; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 653 "regression-bugs-tmp/SIM.imp"
READATOM();
                                                                //    654      %if atom=")" %or atom="," %or atom="/" %start
_imp_current_line = 654; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 654 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal(")")) == 0)) goto L_00a6;
#line 654 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal(",")) == 0)) goto L_00a6;
#line 654 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal("/")) != 0)) goto L_00c2;
#line 654 "regression-bugs-tmp/SIM.imp"
L_00a6:;
                                                                //    655        printstring(atom); printstring(" not expected"); newline
_imp_current_line = 655; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 655 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(ATOM);
_imp_current_line = 655; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 655 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal(" not expected"));
_imp_current_line = 655; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 655 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    656        %exit
_imp_current_line = 656; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 656 "regression-bugs-tmp/SIM.imp"
goto L_00c0;
                                                                //    657      %finish
_imp_current_line = 657; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 657 "regression-bugs-tmp/SIM.imp"
L_00c2:;
                                                                //    658      s==nil; s==findsignal %unless atom="?"
_imp_current_line = 658; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 658 "regression-bugs-tmp/SIM.imp"
S = NIL;
_imp_current_line = 658; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 658 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal("?")) == 0)) goto L_00c3;
#line 658 "regression-bugs-tmp/SIM.imp"
S = FINDSIGNAL();
#line 658 "regression-bugs-tmp/SIM.imp"
L_00c3:;
                                                                //    659      p==newpin; p_next==plist; plist==p
_imp_current_line = 659; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 659 "regression-bugs-tmp/SIM.imp"
P = NEWPIN();
_imp_current_line = 659; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 659 "regression-bugs-tmp/SIM.imp"
P->NEXT = PLIST;
_imp_current_line = 659; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 659 "regression-bugs-tmp/SIM.imp"
PLIST = P;
                                                                //    660      p_comp==c; p_signal==s; p_state=open %if s==nil
_imp_current_line = 660; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 660 "regression-bugs-tmp/SIM.imp"
P->COMP = C;
_imp_current_line = 660; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 660 "regression-bugs-tmp/SIM.imp"
P->SIGNAL = S;
_imp_current_line = 660; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 660 "regression-bugs-tmp/SIM.imp"
if (((S) != (NIL))) goto L_00c4;
#line 660 "regression-bugs-tmp/SIM.imp"
P->STATE = 0;
#line 660 "regression-bugs-tmp/SIM.imp"
L_00c4:;
                                                                //    661      readatom
_imp_current_line = 661; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 661 "regression-bugs-tmp/SIM.imp"
READATOM();
                                                                //    662      %exitif atom=")" %or atom="/"
_imp_current_line = 662; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 662 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal(")")) == 0)) goto L_00c5;
#line 662 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal("/")) != 0)) goto L_00c6;
#line 662 "regression-bugs-tmp/SIM.imp"
L_00c5:;
#line 662 "regression-bugs-tmp/SIM.imp"
goto L_00c0;
#line 662 "regression-bugs-tmp/SIM.imp"
L_00c6:;
                                                                //    663      printstring(", expected") %and newline %unless atom=","
_imp_current_line = 663; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 663 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal(",")) == 0)) goto L_00c7;
#line 663 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal(", expected"));
#line 663 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
#line 663 "regression-bugs-tmp/SIM.imp"
L_00c7:;
                                                                //    664    %repeat
_imp_current_line = 664; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 664 "regression-bugs-tmp/SIM.imp"
goto L_00bf;
#line 664 "regression-bugs-tmp/SIM.imp"
L_00c0:;
                                                                //    665    readatom %if atom=")"
_imp_current_line = 665; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 665 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal(")")) != 0)) goto L_00c8;
#line 665 "regression-bugs-tmp/SIM.imp"
READATOM();
#line 665 "regression-bugs-tmp/SIM.imp"
L_00c8:;
                                                                //    666    printstring("-> expected") %and newline %unless atom="/"
_imp_current_line = 666; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 666 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal("/")) == 0)) goto L_00c9;
#line 666 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal("-> expected"));
#line 666 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
#line 666 "regression-bugs-tmp/SIM.imp"
L_00c9:;
                                                                //    667    c_ins==reverse(plist); plist==nil
_imp_current_line = 667; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 667 "regression-bugs-tmp/SIM.imp"
C->INS = REVERSE(PLIST);
_imp_current_line = 667; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 667 "regression-bugs-tmp/SIM.imp"
PLIST = NIL;
                                                                //    668    %cycle
_imp_current_line = 668; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 668 "regression-bugs-tmp/SIM.imp"
L_00ca:;
                                                                //    669      readatom
_imp_current_line = 669; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 669 "regression-bugs-tmp/SIM.imp"
READATOM();
                                                                //    670      printstring(", not expected") %and newline %if atom=","
_imp_current_line = 670; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 670 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal(",")) != 0)) goto L_00cd;
#line 670 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal(", not expected"));
#line 670 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
#line 670 "regression-bugs-tmp/SIM.imp"
L_00cd:;
                                                                //    671      s==nil; s==findsignal %unless atom="?"
_imp_current_line = 671; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 671 "regression-bugs-tmp/SIM.imp"
S = NIL;
_imp_current_line = 671; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 671 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal("?")) == 0)) goto L_00ce;
#line 671 "regression-bugs-tmp/SIM.imp"
S = FINDSIGNAL();
#line 671 "regression-bugs-tmp/SIM.imp"
L_00ce:;
                                                                //    672      p==newpin; p_next==plist; plist==p
_imp_current_line = 672; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 672 "regression-bugs-tmp/SIM.imp"
P = NEWPIN();
_imp_current_line = 672; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 672 "regression-bugs-tmp/SIM.imp"
P->NEXT = PLIST;
_imp_current_line = 672; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 672 "regression-bugs-tmp/SIM.imp"
PLIST = P;
                                                                //    673      p_comp==c; p_signal==s; p_state=open %if s==nil
_imp_current_line = 673; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 673 "regression-bugs-tmp/SIM.imp"
P->COMP = C;
_imp_current_line = 673; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 673 "regression-bugs-tmp/SIM.imp"
P->SIGNAL = S;
_imp_current_line = 673; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 673 "regression-bugs-tmp/SIM.imp"
if (((S) != (NIL))) goto L_00cf;
#line 673 "regression-bugs-tmp/SIM.imp"
P->STATE = 0;
#line 673 "regression-bugs-tmp/SIM.imp"
L_00cf:;
                                                                //    674      readatom; %exitunless atom=","
_imp_current_line = 674; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 674 "regression-bugs-tmp/SIM.imp"
READATOM();
_imp_current_line = 674; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 674 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal(",")) == 0)) goto L_00d0;
#line 674 "regression-bugs-tmp/SIM.imp"
goto L_00cb;
#line 674 "regression-bugs-tmp/SIM.imp"
L_00d0:;
                                                                //    675    %repeat
_imp_current_line = 675; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 675 "regression-bugs-tmp/SIM.imp"
goto L_00ca;
#line 675 "regression-bugs-tmp/SIM.imp"
L_00cb:;
                                                                //    676    pend=atom %unless atom=")"
_imp_current_line = 676; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 676 "regression-bugs-tmp/SIM.imp"
if ((_imp_strcmp(ATOM, _imp_str_literal(")")) == 0)) goto L_00d1;
#line 676 "regression-bugs-tmp/SIM.imp"
PEND = ATOM;
#line 676 "regression-bugs-tmp/SIM.imp"
L_00d1:;
                                                                //    677    c_outs==reverse(plist); plist==nil
_imp_current_line = 677; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 677 "regression-bugs-tmp/SIM.imp"
C->OUTS = REVERSE(PLIST);
_imp_current_line = 677; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 677 "regression-bugs-tmp/SIM.imp"
PLIST = NIL;
                                                                //    678    p==c_ins
_imp_current_line = 678; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 678 "regression-bugs-tmp/SIM.imp"
P = C->INS;
                                                                //    679    %whilenot p==nil %cycle
_imp_current_line = 679; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 679 "regression-bugs-tmp/SIM.imp"
L_00d2:;
#line 679 "regression-bugs-tmp/SIM.imp"
if (((P) == (NIL))) goto L_00d3;
                                                                //    680      s==p_signal
_imp_current_line = 680; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 680 "regression-bugs-tmp/SIM.imp"
S = P->SIGNAL;
                                                                //    681      p_chain==s_to %and s_to==p %unless s==nil
_imp_current_line = 681; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 681 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_00d5;
#line 681 "regression-bugs-tmp/SIM.imp"
P->CHAIN = S->TO;
#line 681 "regression-bugs-tmp/SIM.imp"
S->TO = P;
#line 681 "regression-bugs-tmp/SIM.imp"
L_00d5:;
                                                                //    682      p==p_next
_imp_current_line = 682; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 682 "regression-bugs-tmp/SIM.imp"
P = P->NEXT;
                                                                //    683    %repeat
_imp_current_line = 683; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 683 "regression-bugs-tmp/SIM.imp"
goto L_00d2;
#line 683 "regression-bugs-tmp/SIM.imp"
L_00d3:;
                                                                //    684    p==c_outs
_imp_current_line = 684; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 684 "regression-bugs-tmp/SIM.imp"
P = C->OUTS;
                                                                //    685    %whilenot p==nil %cycle
_imp_current_line = 685; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 685 "regression-bugs-tmp/SIM.imp"
L_00d6:;
#line 685 "regression-bugs-tmp/SIM.imp"
if (((P) == (NIL))) goto L_00d7;
                                                                //    686      s==p_signal
_imp_current_line = 686; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 686 "regression-bugs-tmp/SIM.imp"
S = P->SIGNAL;
                                                                //    687      p_chain==s_from %and s_from==p %unless s==nil
_imp_current_line = 687; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 687 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_00d9;
#line 687 "regression-bugs-tmp/SIM.imp"
P->CHAIN = S->FROM;
#line 687 "regression-bugs-tmp/SIM.imp"
S->FROM = P;
#line 687 "regression-bugs-tmp/SIM.imp"
L_00d9:;
                                                                //    688      p==p_next
_imp_current_line = 688; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 688 "regression-bugs-tmp/SIM.imp"
P = P->NEXT;
                                                                //    689    %repeat
_imp_current_line = 689; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 689 "regression-bugs-tmp/SIM.imp"
goto L_00d6;
#line 689 "regression-bugs-tmp/SIM.imp"
L_00d7:;
                                                                //    690  %end
_imp_current_line = 690; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 690 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block READCOMPONENT at level 2
                                                                //    691  
                                                                //    692  %routine simulate
_imp_current_line = 692; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 692 "regression-bugs-tmp/SIM.imp"
void SIMULATE( void )
#line 692 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    693  %integer command,i
_imp_current_line = 693; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 693 "regression-bugs-tmp/SIM.imp"
int COMMAND;
#line 693 "regression-bugs-tmp/SIM.imp"
int I;
                                                                //    694  %record(compf)%name c
_imp_current_line = 694; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 694 "regression-bugs-tmp/SIM.imp"
 COMPF /*name*/*C;
                                                                //    695  %record(sigf)%name s
_imp_current_line = 695; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 695 "regression-bugs-tmp/SIM.imp"
 SIGF /*name*/*S;
                                                                //    696  
                                                                //    697  %routine identify
_imp_current_line = 697; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 697 "regression-bugs-tmp/SIM.imp"
void IDENTIFY( void )
#line 697 "regression-bugs-tmp/SIM.imp"
{
  __label__ _imp_endofblock;
                                                                //    698    readatom
_imp_current_line = 698; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 698 "regression-bugs-tmp/SIM.imp"
READATOM();
                                                                //    699    s==findsignal
_imp_current_line = 699; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 699 "regression-bugs-tmp/SIM.imp"
S = FINDSIGNAL();
                                                                //    700    %if s_from==nil %and s_to==nil %start
_imp_current_line = 700; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 700 "regression-bugs-tmp/SIM.imp"
if (((S->FROM) != (NIL))) goto L_00da;
#line 700 "regression-bugs-tmp/SIM.imp"
if (((S->TO) != (NIL))) goto L_00da;
                                                                //    701      s==nil; printstring("Not connected"); newline
_imp_current_line = 701; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 701 "regression-bugs-tmp/SIM.imp"
S = NIL;
_imp_current_line = 701; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 701 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal("Not connected"));
_imp_current_line = 701; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 701 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    702    %finish
_imp_current_line = 702; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 702 "regression-bugs-tmp/SIM.imp"
L_00da:;
                                                                //    703  %end
_imp_current_line = 703; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 703 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block IDENTIFY at level 3
                                                                //    704  
                                                                //    705    initialise arrays
_imp_current_line = 705; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 705 "regression-bugs-tmp/SIM.imp"
INITIALISEARRAYS();
                                                                //    706    escape(clearscreen); newline
_imp_current_line = 706; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 706 "regression-bugs-tmp/SIM.imp"
ESCAPE(118);
_imp_current_line = 706; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 706 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    707  
                                                                //    708  %cycle
_imp_current_line = 708; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 708 "regression-bugs-tmp/SIM.imp"
L_00db:;
                                                                //    709    escape(home); escape(clearline); newline
_imp_current_line = 709; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 709 "regression-bugs-tmp/SIM.imp"
ESCAPE(72);
_imp_current_line = 709; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 709 "regression-bugs-tmp/SIM.imp"
ESCAPE(75);
_imp_current_line = 709; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 709 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    710    prompt(tostring(esc).tostring(up)."scuovpdr+-?:")
_imp_current_line = 710; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 710 "regression-bugs-tmp/SIM.imp"
_imp_PROMPT(_imp_join((_imp_string)_imp_join((_imp_string)_imp_TOSTRING(27),(_imp_string)_imp_TOSTRING(65)),(_imp_string)_imp_str_literal("scuovpdr+-?:")));
                                                                //    711    escape(clearline); newline
_imp_current_line = 711; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 711 "regression-bugs-tmp/SIM.imp"
ESCAPE(75);
_imp_current_line = 711; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 711 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    712    readsymbol(command) %until command>' '
_imp_current_line = 712; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 712 "regression-bugs-tmp/SIM.imp"
L_00de:;
#line 712 "regression-bugs-tmp/SIM.imp"
_imp_READSYMBOL(&COMMAND);
#line 712 "regression-bugs-tmp/SIM.imp"
if (((COMMAND) > (32))) goto L_00df;
#line 712 "regression-bugs-tmp/SIM.imp"
goto L_00de;
#line 712 "regression-bugs-tmp/SIM.imp"
L_00df:;
                                                                //    713    command=command!32
_imp_current_line = 713; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 713 "regression-bugs-tmp/SIM.imp"
COMMAND = ((COMMAND) | (32));
                                                                //    714    %stopif command=':'
_imp_current_line = 714; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 714 "regression-bugs-tmp/SIM.imp"
if (((COMMAND) != (58))) goto L_00e1;
#line 714 "regression-bugs-tmp/SIM.imp"
exit(0);
#line 714 "regression-bugs-tmp/SIM.imp"
L_00e1:;
                                                                //    715    %if command='-' %start
_imp_current_line = 715; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 715 "regression-bugs-tmp/SIM.imp"
if (((COMMAND) != (45))) goto L_00e2;
                                                                //    716      identify
_imp_current_line = 716; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 716 "regression-bugs-tmp/SIM.imp"
IDENTIFY();
                                                                //    717      %unless s==nil %start
_imp_current_line = 717; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 717 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_00e3;
                                                                //    718        i=s_screenslot
_imp_current_line = 718; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 718 "regression-bugs-tmp/SIM.imp"
I = S->SCREENSLOT;
                                                                //    719        %unless i=0 %start
_imp_current_line = 719; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 719 "regression-bugs-tmp/SIM.imp"
if (((I) == (0))) goto L_00e4;
                                                                //    720          slot(i)==nil
_imp_current_line = 720; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 720 "regression-bugs-tmp/SIM.imp"
SLOT[(((int)(I)) - (1))] = NIL;
                                                                //    721          s_screenslot=0
_imp_current_line = 721; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 721 "regression-bugs-tmp/SIM.imp"
S->SCREENSLOT = 0;
                                                                //    722          cursor(0,i+i+1); escape(clearline)
_imp_current_line = 722; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 722 "regression-bugs-tmp/SIM.imp"
CURSOR(0, (((int)((((int)(I)) + (I)))) + (1)));
_imp_current_line = 722; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 722 "regression-bugs-tmp/SIM.imp"
ESCAPE(75);
                                                                //    723          cursor(0,i+i);   escape(clearline)
_imp_current_line = 723; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 723 "regression-bugs-tmp/SIM.imp"
CURSOR(0, (((int)(I)) + (I)));
_imp_current_line = 723; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 723 "regression-bugs-tmp/SIM.imp"
ESCAPE(75);
                                                                //    724          newline; !??
_imp_current_line = 724; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 724 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    725        %finish
_imp_current_line = 725; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 725 "regression-bugs-tmp/SIM.imp"
L_00e4:;
                                                                //    726      %finish
_imp_current_line = 726; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 726 "regression-bugs-tmp/SIM.imp"
L_00e3:;
                                                                //    727    %finishelseif command='+' %start
_imp_current_line = 727; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 727 "regression-bugs-tmp/SIM.imp"
goto L_00e5;
#line 727 "regression-bugs-tmp/SIM.imp"
L_00e2:;
#line 727 "regression-bugs-tmp/SIM.imp"
if (((COMMAND) != (43))) goto L_00e6;
                                                                //    728      identify
_imp_current_line = 728; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 728 "regression-bugs-tmp/SIM.imp"
IDENTIFY();
                                                                //    729      %unless s==nil %start
_imp_current_line = 729; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 729 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_00e7;
                                                                //    730        %if s_screenslot=0 %start
_imp_current_line = 730; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 730 "regression-bugs-tmp/SIM.imp"
if (((S->SCREENSLOT) != (0))) goto L_00e8;
                                                                //    731          %for i=1,1,slotmax %cycle
_imp_current_line = 731; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 731 "regression-bugs-tmp/SIM.imp"
I = 0;
if ((((11)-(1)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle I = 1, 1, 11");
L_00e9:;
if (I == 11) goto L_00ea;
I += 1;
                                                                //    732            %if slot(i)==nil %start
_imp_current_line = 732; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 732 "regression-bugs-tmp/SIM.imp"
if (((SLOT[(((int)(I)) - (1))]) != (NIL))) goto L_00ec;
                                                                //    733              slot(i)==s; s_screenslot=i
_imp_current_line = 733; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 733 "regression-bugs-tmp/SIM.imp"
SLOT[(((int)(I)) - (1))] = S;
_imp_current_line = 733; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 733 "regression-bugs-tmp/SIM.imp"
S->SCREENSLOT = I;
                                                                //    734              refresh(i)
_imp_current_line = 734; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 734 "regression-bugs-tmp/SIM.imp"
REFRESH(I);
                                                                //    735              %exit
_imp_current_line = 735; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 735 "regression-bugs-tmp/SIM.imp"
goto L_00ea;
                                                                //    736            %finish
_imp_current_line = 736; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 736 "regression-bugs-tmp/SIM.imp"
L_00ec:;
                                                                //    737          %repeat
_imp_current_line = 737; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 737 "regression-bugs-tmp/SIM.imp"
goto L_00e9;
#line 737 "regression-bugs-tmp/SIM.imp"
L_00ea:;
                                                                //    738        %finish
_imp_current_line = 738; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 738 "regression-bugs-tmp/SIM.imp"
L_00e8:;
                                                                //    739      %finish
_imp_current_line = 739; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 739 "regression-bugs-tmp/SIM.imp"
L_00e7:;
                                                                //    740    %finishelseif command='r' %start
_imp_current_line = 740; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 740 "regression-bugs-tmp/SIM.imp"
goto L_00e5;
#line 740 "regression-bugs-tmp/SIM.imp"
L_00e6:;
#line 740 "regression-bugs-tmp/SIM.imp"
if (((COMMAND) != (114))) goto L_00ed;
                                                                //    741      refresh(i) %for i=1,1,slotmax
_imp_current_line = 741; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 741 "regression-bugs-tmp/SIM.imp"
I = 0;
if ((((11)-(1)) % (1)) != 0) _imp_signal(5,1,0,"Illegal cycle I = 1, 1, 11");
L_00ee:;
if (I == 11) goto L_00ef;
I += 1;
#line 741 "regression-bugs-tmp/SIM.imp"
REFRESH(I);
#line 741 "regression-bugs-tmp/SIM.imp"
goto L_00ee;
#line 741 "regression-bugs-tmp/SIM.imp"
L_00ef:;
                                                                //    742    %finishelseif command='?' %start
_imp_current_line = 742; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 742 "regression-bugs-tmp/SIM.imp"
goto L_00e5;
#line 742 "regression-bugs-tmp/SIM.imp"
L_00ed:;
#line 742 "regression-bugs-tmp/SIM.imp"
if (((COMMAND) != (63))) goto L_00f1;
                                                                //    743      identify
_imp_current_line = 743; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 743 "regression-bugs-tmp/SIM.imp"
IDENTIFY();
                                                                //    744      %unless s==nil %start
_imp_current_line = 744; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 744 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_00f2;
                                                                //    745        printstring(atom); printstring(" = "); print(s_state); newline
_imp_current_line = 745; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 745 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(ATOM);
_imp_current_line = 745; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 745 "regression-bugs-tmp/SIM.imp"
_imp_PRINTSTRING(_imp_str_literal(" = "));
_imp_current_line = 745; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 745 "regression-bugs-tmp/SIM.imp"
PRINT(S->STATE);
_imp_current_line = 745; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 745 "regression-bugs-tmp/SIM.imp"
_imp_NEWLINE();
                                                                //    746      %finish
_imp_current_line = 746; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 746 "regression-bugs-tmp/SIM.imp"
L_00f2:;
                                                                //    747    %finishelseif command='s' %start
_imp_current_line = 747; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 747 "regression-bugs-tmp/SIM.imp"
goto L_00e5;
#line 747 "regression-bugs-tmp/SIM.imp"
L_00f1:;
#line 747 "regression-bugs-tmp/SIM.imp"
if (((COMMAND) != (115))) goto L_00f3;
                                                                //    748      identify
_imp_current_line = 748; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 748 "regression-bugs-tmp/SIM.imp"
IDENTIFY();
                                                                //    749      %unless s==nil %start
_imp_current_line = 749; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 749 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_00f4;
                                                                //    750        s_state=rising; propagate(s)
_imp_current_line = 750; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 750 "regression-bugs-tmp/SIM.imp"
S->STATE = 1;
_imp_current_line = 750; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 750 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    751        s_state=high; propagate(s)
_imp_current_line = 751; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 751 "regression-bugs-tmp/SIM.imp"
S->STATE = 2;
_imp_current_line = 751; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 751 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    752        aftermath
_imp_current_line = 752; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 752 "regression-bugs-tmp/SIM.imp"
AFTERMATH();
                                                                //    753      %finish
_imp_current_line = 753; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 753 "regression-bugs-tmp/SIM.imp"
L_00f4:;
                                                                //    754    %finishelseif command='c' %start
_imp_current_line = 754; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 754 "regression-bugs-tmp/SIM.imp"
goto L_00e5;
#line 754 "regression-bugs-tmp/SIM.imp"
L_00f3:;
#line 754 "regression-bugs-tmp/SIM.imp"
if (((COMMAND) != (99))) goto L_00f5;
                                                                //    755      identify
_imp_current_line = 755; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 755 "regression-bugs-tmp/SIM.imp"
IDENTIFY();
                                                                //    756      %unless s==nil %start
_imp_current_line = 756; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 756 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_00f6;
                                                                //    757        s_state=falling; propagate(s)
_imp_current_line = 757; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 757 "regression-bugs-tmp/SIM.imp"
S->STATE = (-1);
_imp_current_line = 757; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 757 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    758        s_state=low; propagate(s)
_imp_current_line = 758; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 758 "regression-bugs-tmp/SIM.imp"
S->STATE = (-2);
_imp_current_line = 758; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 758 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    759        aftermath
_imp_current_line = 759; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 759 "regression-bugs-tmp/SIM.imp"
AFTERMATH();
                                                                //    760      %finish
_imp_current_line = 760; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 760 "regression-bugs-tmp/SIM.imp"
L_00f6:;
                                                                //    761    %finishelseif command='u' %start
_imp_current_line = 761; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 761 "regression-bugs-tmp/SIM.imp"
goto L_00e5;
#line 761 "regression-bugs-tmp/SIM.imp"
L_00f5:;
#line 761 "regression-bugs-tmp/SIM.imp"
if (((COMMAND) != (117))) goto L_00f7;
                                                                //    762      identify
_imp_current_line = 762; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 762 "regression-bugs-tmp/SIM.imp"
IDENTIFY();
                                                                //    763      %unless s==nil %start
_imp_current_line = 763; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 763 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_00f8;
                                                                //    764        s_state=undef; propagate(s)
_imp_current_line = 764; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 764 "regression-bugs-tmp/SIM.imp"
S->STATE = (-2147483648);
_imp_current_line = 764; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 764 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    765        aftermath
_imp_current_line = 765; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 765 "regression-bugs-tmp/SIM.imp"
AFTERMATH();
                                                                //    766      %finish
_imp_current_line = 766; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 766 "regression-bugs-tmp/SIM.imp"
L_00f8:;
                                                                //    767    %finishelseif command='o' %start
_imp_current_line = 767; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 767 "regression-bugs-tmp/SIM.imp"
goto L_00e5;
#line 767 "regression-bugs-tmp/SIM.imp"
L_00f7:;
#line 767 "regression-bugs-tmp/SIM.imp"
if (((COMMAND) != (111))) goto L_00f9;
                                                                //    768      identify
_imp_current_line = 768; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 768 "regression-bugs-tmp/SIM.imp"
IDENTIFY();
                                                                //    769      %unless s==nil %start
_imp_current_line = 769; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 769 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_00fa;
                                                                //    770        s_state=open; propagate(s)
_imp_current_line = 770; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 770 "regression-bugs-tmp/SIM.imp"
S->STATE = 0;
_imp_current_line = 770; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 770 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    771        aftermath
_imp_current_line = 771; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 771 "regression-bugs-tmp/SIM.imp"
AFTERMATH();
                                                                //    772      %finish
_imp_current_line = 772; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 772 "regression-bugs-tmp/SIM.imp"
L_00fa:;
                                                                //    773    %finishelseif command='v' %start
_imp_current_line = 773; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 773 "regression-bugs-tmp/SIM.imp"
goto L_00e5;
#line 773 "regression-bugs-tmp/SIM.imp"
L_00f9:;
#line 773 "regression-bugs-tmp/SIM.imp"
if (((COMMAND) != (118))) goto L_00fb;
                                                                //    774      identify
_imp_current_line = 774; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 774 "regression-bugs-tmp/SIM.imp"
IDENTIFY();
                                                                //    775      %unless s==nil %start
_imp_current_line = 775; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 775 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_00fc;
                                                                //    776      %if |s_state|=high %start
_imp_current_line = 776; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 776 "regression-bugs-tmp/SIM.imp"
if (((_imp_IMOD(S->STATE)) != (2))) goto L_00fd;
                                                                //    777        s_state=-s_state//2; propagate(s)
_imp_current_line = 777; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 777 "regression-bugs-tmp/SIM.imp"
S->STATE = (-(((long)((long)((int)(S->STATE)) / (long)((int)(2))))));
_imp_current_line = 777; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 777 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    778        s_state=s_state<<1; propagate(s)
_imp_current_line = 778; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 778 "regression-bugs-tmp/SIM.imp"
S->STATE = ((S->STATE) << (1));
_imp_current_line = 778; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 778 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    779        aftermath
_imp_current_line = 779; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 779 "regression-bugs-tmp/SIM.imp"
AFTERMATH();
                                                                //    780      %finish
_imp_current_line = 780; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 780 "regression-bugs-tmp/SIM.imp"
L_00fd:;
                                                                //    781      %finish
_imp_current_line = 781; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 781 "regression-bugs-tmp/SIM.imp"
L_00fc:;
                                                                //    782    %finishelseif command='p' %start
_imp_current_line = 782; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 782 "regression-bugs-tmp/SIM.imp"
goto L_00e5;
#line 782 "regression-bugs-tmp/SIM.imp"
L_00fb:;
#line 782 "regression-bugs-tmp/SIM.imp"
if (((COMMAND) != (112))) goto L_00fe;
                                                                //    783      identify
_imp_current_line = 783; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 783 "regression-bugs-tmp/SIM.imp"
IDENTIFY();
                                                                //    784      %unless s==nil %start
_imp_current_line = 784; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 784 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_00ff;
                                                                //    785      %if |s_state|=high %start
_imp_current_line = 785; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 785 "regression-bugs-tmp/SIM.imp"
if (((_imp_IMOD(S->STATE)) != (2))) goto L_0100;
                                                                //    786        s_state=-s_state//2; propagate(s)
_imp_current_line = 786; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 786 "regression-bugs-tmp/SIM.imp"
S->STATE = (-(((long)((long)((int)(S->STATE)) / (long)((int)(2))))));
_imp_current_line = 786; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 786 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    787        s_state=s_state<<1; propagate(s)
_imp_current_line = 787; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 787 "regression-bugs-tmp/SIM.imp"
S->STATE = ((S->STATE) << (1));
_imp_current_line = 787; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 787 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    788        aftermath
_imp_current_line = 788; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 788 "regression-bugs-tmp/SIM.imp"
AFTERMATH();
                                                                //    789        s_state=-s_state//2; propagate(s)
_imp_current_line = 789; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 789 "regression-bugs-tmp/SIM.imp"
S->STATE = (-(((long)((long)((int)(S->STATE)) / (long)((int)(2))))));
_imp_current_line = 789; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 789 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    790        s_state=s_state<<1; propagate(s)
_imp_current_line = 790; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 790 "regression-bugs-tmp/SIM.imp"
S->STATE = ((S->STATE) << (1));
_imp_current_line = 790; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 790 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    791        aftermath
_imp_current_line = 791; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 791 "regression-bugs-tmp/SIM.imp"
AFTERMATH();
                                                                //    792      %finish
_imp_current_line = 792; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 792 "regression-bugs-tmp/SIM.imp"
L_0100:;
                                                                //    793      %finish
_imp_current_line = 793; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 793 "regression-bugs-tmp/SIM.imp"
L_00ff:;
                                                                //    794    %finishelseif command='d' %start
_imp_current_line = 794; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 794 "regression-bugs-tmp/SIM.imp"
goto L_00e5;
#line 794 "regression-bugs-tmp/SIM.imp"
L_00fe:;
#line 794 "regression-bugs-tmp/SIM.imp"
if (((COMMAND) != (100))) goto L_0101;
                                                                //    795      s==nets
_imp_current_line = 795; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 795 "regression-bugs-tmp/SIM.imp"
S = NETS;
                                                                //    796      %cycle
_imp_current_line = 796; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 796 "regression-bugs-tmp/SIM.imp"
L_0102:;
                                                                //    797        %if s_state=undef %start
_imp_current_line = 797; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 797 "regression-bugs-tmp/SIM.imp"
if (((S->STATE) != ((-2147483648)))) goto L_0105;
                                                                //    798          prompt(s_name." = "); readsymbol(sym)
_imp_current_line = 798; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 798 "regression-bugs-tmp/SIM.imp"
_imp_PROMPT(_imp_join((_imp_string)S->NAME,(_imp_string)_imp_str_literal(" = ")));
_imp_current_line = 798; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 798 "regression-bugs-tmp/SIM.imp"
_imp_READSYMBOL(&SYM);
                                                                //    799          %if sym#nl %start
_imp_current_line = 799; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 799 "regression-bugs-tmp/SIM.imp"
if (((SYM) == (10))) goto L_0106;
                                                                //    800            sym=sym!32
_imp_current_line = 800; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 800 "regression-bugs-tmp/SIM.imp"
SYM = ((SYM) | (32));
                                                                //    801            %if sym='h' %start
_imp_current_line = 801; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 801 "regression-bugs-tmp/SIM.imp"
if (((SYM) != (104))) goto L_0107;
                                                                //    802              s_state=rising; propagate(s)
_imp_current_line = 802; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 802 "regression-bugs-tmp/SIM.imp"
S->STATE = 1;
_imp_current_line = 802; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 802 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    803              s_state=high; propagate(s)
_imp_current_line = 803; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 803 "regression-bugs-tmp/SIM.imp"
S->STATE = 2;
_imp_current_line = 803; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 803 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    804            %finishelseif sym='l' %start
_imp_current_line = 804; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 804 "regression-bugs-tmp/SIM.imp"
goto L_0108;
#line 804 "regression-bugs-tmp/SIM.imp"
L_0107:;
#line 804 "regression-bugs-tmp/SIM.imp"
if (((SYM) != (108))) goto L_0109;
                                                                //    805              s_state=falling; propagate(s)
_imp_current_line = 805; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 805 "regression-bugs-tmp/SIM.imp"
S->STATE = (-1);
_imp_current_line = 805; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 805 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    806              s_state=low; propagate(s)
_imp_current_line = 806; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 806 "regression-bugs-tmp/SIM.imp"
S->STATE = (-2);
_imp_current_line = 806; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 806 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    807            %finishelseif sym='o' %start
_imp_current_line = 807; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 807 "regression-bugs-tmp/SIM.imp"
goto L_0108;
#line 807 "regression-bugs-tmp/SIM.imp"
L_0109:;
#line 807 "regression-bugs-tmp/SIM.imp"
if (((SYM) != (111))) goto L_010a;
                                                                //    808              s_state=open; propagate(s)
_imp_current_line = 808; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 808 "regression-bugs-tmp/SIM.imp"
S->STATE = 0;
_imp_current_line = 808; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 808 "regression-bugs-tmp/SIM.imp"
PROPAGATE(S);
                                                                //    809            %finishelse sym=0
_imp_current_line = 809; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 809 "regression-bugs-tmp/SIM.imp"
goto L_0108;
#line 809 "regression-bugs-tmp/SIM.imp"
L_010a:;
#line 809 "regression-bugs-tmp/SIM.imp"
SYM = 0;
#line 809 "regression-bugs-tmp/SIM.imp"
L_0108:;
                                                                //    810            aftermath %unless sym=0
_imp_current_line = 810; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 810 "regression-bugs-tmp/SIM.imp"
if (((SYM) == (0))) goto L_010b;
#line 810 "regression-bugs-tmp/SIM.imp"
AFTERMATH();
#line 810 "regression-bugs-tmp/SIM.imp"
L_010b:;
                                                                //    811            readsymbol(sym) %until sym=nl
_imp_current_line = 811; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 811 "regression-bugs-tmp/SIM.imp"
L_010c:;
#line 811 "regression-bugs-tmp/SIM.imp"
_imp_READSYMBOL(&SYM);
#line 811 "regression-bugs-tmp/SIM.imp"
if (((SYM) == (10))) goto L_010d;
#line 811 "regression-bugs-tmp/SIM.imp"
goto L_010c;
#line 811 "regression-bugs-tmp/SIM.imp"
L_010d:;
                                                                //    812          %finish
_imp_current_line = 812; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 812 "regression-bugs-tmp/SIM.imp"
L_0106:;
                                                                //    813        %finish
_imp_current_line = 813; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 813 "regression-bugs-tmp/SIM.imp"
L_0105:;
                                                                //    814        s==s_next
_imp_current_line = 814; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 814 "regression-bugs-tmp/SIM.imp"
S = S->NEXT;
                                                                //    815      %repeatuntil s==nil
_imp_current_line = 815; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 815 "regression-bugs-tmp/SIM.imp"
if (((S) == (NIL))) goto L_0103;
#line 815 "regression-bugs-tmp/SIM.imp"
goto L_0102;
#line 815 "regression-bugs-tmp/SIM.imp"
L_0103:;
                                                                //    816    %finish
_imp_current_line = 816; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 816 "regression-bugs-tmp/SIM.imp"
L_0101:;
#line 816 "regression-bugs-tmp/SIM.imp"
L_00e5:;
                                                                //    817  %repeat
_imp_current_line = 817; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 817 "regression-bugs-tmp/SIM.imp"
goto L_00db;
                                                                //    818  %end
_imp_current_line = 818; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 818 "regression-bugs-tmp/SIM.imp"
return;
_imp_endofblock: ;
} // End of block SIMULATE at level 2
                                                                //    819  
                                                                //    820  %integer stream=1
_imp_current_line = 820; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 820 "regression-bugs-tmp/SIM.imp"
int STREAM;
#line 820 "regression-bugs-tmp/SIM.imp"
STREAM = 1;
                                                                //    821  
                                                                //    822  %onevent 9 %start
_imp_current_line = 822; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 822 "regression-bugs-tmp/SIM.imp"
if (!_imp_on_event(9)) goto L_00dc;
                                                                //    823    %stopif stream=0; stream=0
_imp_current_line = 823; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 823 "regression-bugs-tmp/SIM.imp"
if (((STREAM) != (0))) goto L_010f;
#line 823 "regression-bugs-tmp/SIM.imp"
exit(0);
#line 823 "regression-bugs-tmp/SIM.imp"
L_010f:;
_imp_current_line = 823; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 823 "regression-bugs-tmp/SIM.imp"
STREAM = 0;
                                                                //    824  %finish
_imp_current_line = 824; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 824 "regression-bugs-tmp/SIM.imp"
L_00dc:;
                                                                //    825  
                                                                //    826  selectinput(stream)
_imp_current_line = 826; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 826 "regression-bugs-tmp/SIM.imp"
_imp_SELECTINPUT(STREAM);
                                                                //    827  simulate %if stream=0
_imp_current_line = 827; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 827 "regression-bugs-tmp/SIM.imp"
if (((STREAM) != (0))) goto L_0110;
#line 827 "regression-bugs-tmp/SIM.imp"
SIMULATE();
#line 827 "regression-bugs-tmp/SIM.imp"
L_0110:;
                                                                //    828  %cycle
_imp_current_line = 828; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 828 "regression-bugs-tmp/SIM.imp"
L_0111:;
                                                                //    829    readcomponent
_imp_current_line = 829; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 829 "regression-bugs-tmp/SIM.imp"
READCOMPONENT();
                                                                //    830  %repeat
_imp_current_line = 830; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 830 "regression-bugs-tmp/SIM.imp"
goto L_0111;
                                                                //    831  
                                                                //    832  %endofprogram
_imp_current_line = 832; _imp_current_file = "regression-bugs-tmp/SIM.imp";
#line 832 "regression-bugs-tmp/SIM.imp"
return 0;
_imp_endofblock: ;
} // End of block _imp_main at level 1
#line 832 "regression-bugs-tmp/SIM.imp"
// End of file
