#include "chdecl.h"
void CH_checkcomponent_list(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 c13;
    case 5: goto c21;
    case 6: goto c26;
    case 7: goto c28;
    case 8: goto c29;
    case 9: goto c31;  }
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 , 21 */
  if ((ch_returncode = get_selected_object(DEF(5),DEF(4),sched)) != Normal)
     goto c21;
/* find 6 3.2 3.1.0 , 0 */
  if (findfunc(DEF(6),DEF(3)DOT(2),(
          arguments[0] = DEF(3)DOT(1)DOT(0),& arguments[0]),sched,0
            ) == FAILURE) goto ch_notfound;
/* find 7 6.1 3.1.1 , 0 */
  if (findfunc(DEF(7),DEF(6)DOT(1),(
          arguments[0] = DEF(3)DOT(1)DOT(1),& arguments[0]),sched,0
            ) == FAILURE) goto ch_notfound;
/* block , 2 */
  if((ch_returncode = che_block(QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
/* find 8 7.1 5 , 0 */
  if (findfunc(DEF(8),DEF(7)DOT(1),(
          arguments[0] = DEF(5),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* copy 3.1 8.1 */
  if((ch_returncode = (REF(8)DOT(1).tsdr->copy)(& ch_val, REF(8)DOT(1).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(3)DOT(1).tsdr)->finalize)(REF(3)DOT(1).value,F_DISCARD,sched);
  REF(3)DOT(1).value = ch_val;
  REF(3)DOT(1).tsdr = datarepmap[REF(8)DOT(1).tsdr->number];
/* endblock */
  che_endblock(sched);
/* branch , 5 */
   goto c5;
c13:
/* copy 9 3.3 */
  if((ch_returncode = (REF(3)DOT(3).tsdr->copy)(& ch_val, REF(3)DOT(3).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(9).tsdr)->finalize)(REF(9).value,F_DISCARD,sched);
  REF(9).value = ch_val;
  REF(9).tsdr = datarepmap[REF(3)DOT(3).tsdr->number];
/* chs_lit 10 , "non-existent component in component list" */
  if( !chs_lit(DEF(10),"non-existent component in component list") )
     goto ch_depletion;
/* unite 11 10 , 3 */
  if ((ch_returncode = che_unite(DEF(11),DEF(10),sched,3)) != Normal)
     goto ch_raise_exception;
/* insert 9.2 11 */
  if ((ch_returncode = insertfunc(DEF(9)DOT(2),DEF(11),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* insert 3.4 9 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(4),DEF(9),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* exit , 3 */
  ch_e = handler_type__exit; ch_val = QUAL(3); goto ch_exception;
c21:
/* 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;
/* 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);
/* branch , 29 */
   goto c29;
c26:
/* 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;
/* branch , 29 */
   goto c29;
c28:
/* 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;
c29:
/* endblock */
  che_endblock(sched);
c31:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
