#include "chdecl.h"
void CH_codegen_lkuptype(current, sched, cop)
#define ARGUMENTS 6
#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 c26;
    case 5: goto c29;
    case 6: goto c32;
    case 7: goto c35;
    case 8: goto c37;  }
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 */
  if (findfunc(DEF(4),DEF(3)DOT(1),(
          arguments[0] = DEF(3)DOT(0)DOT(0),& arguments[0]),sched,0
            ) == FAILURE) goto ch_notfound;
/* find 5 4.1 3.0.1 , 0 */
  if (findfunc(DEF(5),DEF(4)DOT(1),(
          arguments[0] = DEF(3)DOT(0)DOT(1),& arguments[0]),sched,0
            ) == FAILURE) goto ch_notfound;
/* case 6 5.1 */
  REF(6).value.enumeration = REF(5)DOT(1).value.variant->info.variant_case;
  REF(6).tsdr = & dr_enumeration;
/* notequal . 6 =(0) , 12 */
  if ( REF(6).value.enumeration != 0 ) goto c12;
/* reveal 5.1 , 0 */
  if (0 != REF(5)DOT(1).value.variant->info.variant_case) goto ch_case_error;
/* copy 3.4 5.1.0 */
  if((ch_returncode = (REF(5)DOT(1)DOT(0).tsdr->copy)(& ch_val, 
    REF(5)DOT(1)DOT(0).value)) != Normal) goto ch_raise_exception;
  (*(REF(3)DOT(4).tsdr)->finalize)(REF(3)DOT(4).value,F_DISCARD,sched);
  REF(3)DOT(4).value = ch_val;
  REF(3)DOT(4).tsdr = datarepmap[REF(5)DOT(1)DOT(0).tsdr->number];
/* branch , 32 */
   goto c32;
c12:
/* block , 2 */
  if((ch_returncode = che_block(QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
/* find 7 3.2 3.0 , 0 */
  if (findfunc(DEF(7),DEF(3)DOT(2),(
          arguments[0] = DEF(3)DOT(0),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* copy 3.4 7.1 */
  if((ch_returncode = (REF(7)DOT(1).tsdr->copy)(& ch_val, REF(7)DOT(1).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(3)DOT(4).tsdr)->finalize)(REF(3)DOT(4).value,F_DISCARD,sched);
  REF(3)DOT(4).value = ch_val;
  REF(3)DOT(4).tsdr = datarepmap[REF(7)DOT(1).tsdr->number];
/* endblock */
  che_endblock(sched);
/* branch , 32 */
   goto c32;
c17:
/* block , 3 */
  if((ch_returncode = che_block(QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
/* find 8 3.3 3.0.0 3.0.1 , 0 */
  if (findfunc(DEF(8),DEF(3)DOT(3),(
          arguments[0] = DEF(3)DOT(0)DOT(0),
          arguments[1] = DEF(3)DOT(0)DOT(1),& arguments[0]),sched,0
            ) == FAILURE) goto ch_notfound;
/* chs_lit 9 , "Missing typemark for variable " */
  if( !chs_lit(DEF(9),"Missing typemark for variable ") ) goto ch_depletion;
/* concat 10 9 8.2 */
  if ((ch_returncode = che_concat(DEF(10),DEF(9),DEF(8)DOT(2)
    ,sched)) != Normal) goto ch_raise_exception;
/* discard 9 */
  (*(REF(9).tsdr)->finalize)(REF(9).value,F_DISCARD,sched);
  REF(9).tsdr = & dr_bottom;
/* print 10 */
  re_print(stderr, 0, DEF(10)); fflush(stderr);
/* discard 10 */
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  REF(10).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
/* branch , 29 */
   goto c29;
c26:
/* chs_lit 11 , "Missing typemark for unknown or temp variable" */
  if( !chs_lit(DEF(11),"Missing typemark for unknown or temp variable") )
     goto ch_depletion;
/* print 11 */
  re_print(stderr, 0, DEF(11)); fflush(stderr);
/* discard 11 */
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).tsdr = & dr_bottom;
c29:
/* discard 3 */
  (*(REF(3).tsdr)->finalize)(REF(3).value,F_DISCARD,sched);
  REF(3).tsdr = & dr_bottom;
/* exit , 4 */
  ch_e = handler_type__exit; ch_val = QUAL(4); goto ch_exception;
c32:
/* 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);
c35:
/* endblock */
  che_endblock(sched);
c37:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
