#include "chdecl.h"
void CH_checkdefs_proglit(current, sched, cop)
#define ARGUMENTS 5
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb2;
    case 2: goto c3;
    case 3: goto c5;
    case 4: goto c25;
    case 5: goto c27;
    case 6: goto c28;
    case 7: goto c30;  }
c0:
/* block , 0 */
  if((ch_returncode = che_block(QUAL(0),sched)) != Normal)
     goto ch_raise_exception;
/* block , 1 */
  if((ch_returncode = che_block(QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
  current->ip = 1;
cb2:
/* receive 3 0 */
  if ((ch_returncode = che_receive(DEF(3),DEF(0),sched)) != Normal)
     goto ch_raise_exception;
  return;
c3:
/* copy 4 3.0 */
  if((ch_returncode = cp_table(& ch_val, REF(3)DOT(0).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).value = ch_val;
  REF(4).tsdr = & dr_table;
/* initget 5 4 , 0,0 */
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(5),DEF(4),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c5:
/* get_or_goto 5 4 , 14 */
  if ((ch_returncode = get_selected_object(DEF(5),DEF(4),sched)) != Normal)
     goto c14;
/* position 6 5 */
  ch_frame = get_selector_frame(DEF(5),sched);
  ch_t = ch_frame->inspectee->value.table;
  REF(6).value.integer = ch_frame->rmvcount +
    (*(ch_t->tbls[ORDER_TBL].des->position_of))(ch_t,ORDER_TBL,ch_frame->pos);
  REF(6).tsdr = &dr_integer;
/* lookup_at 7 3.1 6 */
  if((ch_i = REF(6).value.integer) < 0 || ch_i >= (ch_t = REF(3)DOT(1).value
    .table)->size) goto ch_notfound;
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(7).value,ch_i);
  REF(7).tsdr = qdatarepmap[ch_t->tsdr->number];
/* copy 8 7 */
  if((ch_returncode = (REF(7).tsdr->copy)(& ch_val, REF(7).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  REF(8).value = ch_val;
  REF(8).tsdr = datarepmap[REF(7).tsdr->number];
/* notequal 9 5 8 */
  REF(9).value.boolean = (!(REF(5).tsdr->equal)(REF(5).value,REF(8).value));
  REF(9).tsdr = & dr_boolean;
/* discard 8 */
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  REF(8).tsdr = & dr_bottom;
/* branch_false 9 , 5 */
  if ( !REF(9).value.boolean ) goto c5;
/* exit , 2 */
  ch_e = handler_type__exit; ch_val = QUAL(2); goto ch_exception;
c14:
/* endget 5 4 */
  end_selector(DEF(5),DEF(4),sched,GET);
/* discard 4 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).tsdr = & dr_bottom;
/* size 10 3.0 */
  REF(10).value.integer = REF(3)DOT(0).value.table->size;
  REF(10).tsdr = & dr_integer;
/* size 11 3.1 */
  REF(11).value.integer = REF(3)DOT(1).value.table->size;
  REF(11).tsdr = & dr_integer;
/* ige . 10 11 , 22 */
  if ( REF(10).value.integer >= REF(11).value.integer ) goto c22;
/* return_exception 3 , 3 */
  if (ch_caller = do_return(REF(3).value)) {
    raise_user(QUAL(3),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(3),QUAL(3));
  REF(3).tsdr = & dr_bottom;
/* branch , 23 */
   goto c23;
c22:
/* return_exception 3 , 4 */
  if (ch_caller = do_return(REF(3).value)) {
    raise_user(QUAL(4),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(3),QUAL(4));
  REF(3).tsdr = & dr_bottom;
c23:
/* endblock */
  che_endblock(sched);
/* branch , 28 */
   goto c28;
c25:
/* return_exception 3 , 5 */
  if (ch_caller = do_return(REF(3).value)) {
    raise_user(QUAL(5),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(3),QUAL(5));
  REF(3).tsdr = & dr_bottom;
/* branch , 28 */
   goto c28;
c27:
/* 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;
c28:
/* endblock */
  che_endblock(sched);
c30:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
