#include "chdecl.h"
void CH_type_findtype(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 c17;
    case 4: goto c19;
    case 5: goto c25;
    case 6: goto c37;
    case 7: goto c40;  }
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:
/* find 4 3.1 3.0.0.0 , 0 */
  if (findfunc(DEF(4),DEF(3)DOT(1),(
          arguments[0] = DEF(3)DOT(0)DOT(0)DOT(0),& arguments[0]),sched,0
            ) == FAILURE) goto ch_notfound;
/* find 5 4.1 3.0.0.1 , 0 */
  if (findfunc(DEF(5),DEF(4)DOT(1),(
          arguments[0] = DEF(3)DOT(0)DOT(0)DOT(1),& arguments[0]),sched,0
            ) == FAILURE) goto ch_notfound;
/* copy 6 5.1 */
  if((ch_returncode = cp_variant(& ch_val, REF(5)DOT(1).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6).value = ch_val;
  REF(6).tsdr = & dr_variant;
/* case 7 6 */
  REF(7).value.enumeration = REF(6).value.variant->info.variant_case;
  REF(7).tsdr = & dr_enumeration;
/* notequal . 7 =(1) , 19 */
  if ( REF(7).value.enumeration != 1 ) goto c19;
/* block , 2 */
  if((ch_returncode = che_block(QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
/* find 8 3.3 3.0.0 , 0 */
  if (findfunc(DEF(8),DEF(3)DOT(3),(
          arguments[0] = DEF(3)DOT(0)DOT(0),& arguments[0]),sched,0
            ) == FAILURE) goto ch_notfound;
/* copy 9 8 */
  if((ch_returncode = (REF(8).tsdr->copy)(& ch_val, REF(8).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(8).tsdr->number];
/* unite 6 9.1 , 0 */
  if ((ch_returncode = che_unite(DEF(6),DEF(9)DOT(1),sched,0)) != Normal)
     goto ch_raise_exception;
/* endblock */
  che_endblock(sched);
/* branch , 19 */
   goto c19;
c17:
/* 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;
/* exit , 4 */
  ch_e = handler_type__exit; ch_val = QUAL(4); goto ch_exception;
c19:
/* discard 9 */
  (*(REF(9).tsdr)->finalize)(REF(9).value,F_DISCARD,sched);
  REF(9).tsdr = & dr_bottom;
/* reveal 6 , 0 */
  if (0 != REF(6).value.variant->info.variant_case) goto ch_case_error;
/* dissolve 10 6 */
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  REF(10) = REF(6).value.variant->data[VARIANT_COMPONENT];
  { freedotmain(REF(6).value.variant, VARIANT_SIZE); }
  REF(6).tsdr = & dr_bottom;
/* copy 11 3.0.1 */
  if((ch_returncode = cp_table(& ch_val, REF(3)DOT(0)DOT(1).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).value = ch_val;
  REF(11).tsdr = & dr_table;
/* initget 12 11 , 0,0 */
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(12),DEF(11),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c25:
/* get_or_goto 12 11 , 31 */
  if ((ch_returncode = get_selected_object(DEF(12),DEF(11),sched)) != Normal)
     goto c31;
/* find 13 3.2 10.0 , 0 */
  if (findfunc(DEF(13),DEF(3)DOT(2),(
          arguments[0] = DEF(10)DOT(0),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* find 14 13.1 10.1 , 0 */
  if (findfunc(DEF(14),DEF(13)DOT(1),(
          arguments[0] = DEF(10)DOT(1),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* find 15 14.1 12 , 0 */
  if (findfunc(DEF(15),DEF(14)DOT(1),(
          arguments[0] = DEF(12),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* copy 10 15.1 */
  if((ch_returncode = (REF(15)DOT(1).tsdr->copy)(& ch_val, REF(15)DOT(1).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  REF(10).value = ch_val;
  REF(10).tsdr = datarepmap[REF(15)DOT(1).tsdr->number];
/* branch , 25 */
   goto c25;
c31:
/* endget 12 11 */
  end_selector(DEF(12),DEF(11),sched,GET);
/* discard 11 */
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).tsdr = & dr_bottom;
/* move 3.4 10 */
  (*(REF(3)DOT(4).tsdr)->finalize)(REF(3)DOT(4).value,F_DISCARD,sched);
  REF(3)DOT(4) = REF(10);
  REF(10).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);
c37:
/* discard 6 */
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c40:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
