#include "chdecl.h"
void CH_chcode_chupstate_proglit(current, sched, cop)
#define ARGUMENTS 5
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb1;
    case 2: goto c2;
    case 3: goto c14;  }
c0:
/* block , 0 */
  if((ch_returncode = che_block(QUAL(0),sched)) != Normal)
     goto ch_raise_exception;
  current->ip = 1;
cb1:
/* receive 3 0 */
  if ((ch_returncode = che_receive(DEF(3),DEF(0),sched)) != Normal)
     goto ch_raise_exception;
  return;
c2:
/* lookup_at 4 3.0 3.1 */
  if((ch_i = REF(3)DOT(1).value.integer) < 0 || ch_i >= (ch_t = 
    REF(3)DOT(0).value.table)->size) goto ch_notfound;
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(4).value,ch_i);
  REF(4).tsdr = qdatarepmap[ch_t->tsdr->number];
/* equal . 3.1 4.5 , 9 */
  if ( REF(3)DOT(1).value.integer == REF(4)DOT(5).value.integer ) goto c9;
/* copy 3.1 4.5 */
  REF(3)DOT(1) = REF(4)DOT(5);
/* boolean 3.2 , TRUE */
  REF(3)DOT(2).value.boolean = TRUE;
  REF(3)DOT(2).tsdr = & dr_boolean;
/* branch , 11 */
   goto c11;
c9:
/* boolean 3.2 , FALSE */
  REF(3)DOT(2).value.boolean = FALSE;
  REF(3)DOT(2).tsdr = & dr_boolean;
c11:
/* return 3 */
  if (ch_caller = do_return(REF(3).value)) {
    if (ch_caller->type < CProcess) ch_caller->ip++;
      sched->wakeup_proc(sched, ch_caller);}
  else rem_return(REF(3).value);
  REF(3).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c14:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
