#include "chdecl.h"
void CH_codegen_cgforenum(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 cb9;
    case 4: goto c11;
    case 5: goto cb11;
    case 6: goto c12;
    case 7: goto c13;
    case 8: goto cb48;
    case 9: goto c49;
    case 10: goto c79;
    case 11: goto c82;  }
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:
/* reveal 3.0.3 , 6 */
  if (6 != REF(3)DOT(0)DOT(3).value.variant->info.variant_case)
     goto ch_case_error;
/* new_record 4 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).value = ch_val; REF(4).tsdr = & dr_record;
/* new_record 4.0 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(4)DOT(0).tsdr)->finalize)(REF(4)DOT(0).value,F_DISCARD,sched);
  REF(4)DOT(0).value = ch_val; REF(4)DOT(0).tsdr = & dr_record;
/* copy 4.0.1 3.0.3.0.1 */
  if((ch_returncode = (REF(3)DOT(0)DOT(3)DOT(0)DOT(1).tsdr->copy)(& ch_val, 
    REF(3)DOT(0)DOT(3)DOT(0)DOT(1).value)) != Normal) goto ch_raise_exception;
  (*(REF(4)DOT(0)DOT(1).tsdr)->finalize)(REF(4)DOT(0)DOT(1).value
    ,F_DISCARD,sched);
  REF(4)DOT(0)DOT(1).value = ch_val;
  REF(4)DOT(0)DOT(1).tsdr = datarepmap[REF(3)DOT(0)DOT(3)DOT(0)DOT(1).tsdr
    ->number];
/* copy 4.0.0 3.0.3.0.0 */
  if((ch_returncode = (REF(3)DOT(0)DOT(3)DOT(0)DOT(0).tsdr->copy)(& ch_val, 
    REF(3)DOT(0)DOT(3)DOT(0)DOT(0).value)) != Normal) goto ch_raise_exception;
  (*(REF(4)DOT(0)DOT(0).tsdr)->finalize)(REF(4)DOT(0)DOT(0).value
    ,F_DISCARD,sched);
  REF(4)DOT(0)DOT(0).value = ch_val;
  REF(4)DOT(0)DOT(0).tsdr = datarepmap[REF(3)DOT(0)DOT(3)DOT(0)DOT(0).tsdr
    ->number];
/* new_table 4.1 , 2 */
  if ((ch_returncode = che_new_table(DEF(4)DOT(1),QUAL(2),sched)) != Normal) 
     goto ch_raise_exception;
  current->ip = 3;
cb9:
/* call 3.2.4.4 4 5 , 3 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(4)DOT(4),
          arguments[1] = DEF(4),
          arguments[2] = DEF(5),
          arguments[2+1] = nil,& arguments[0]),QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
  return;
c10:
c11:
  current->ip = 5;
cb11:
/* call 3.2.4.6 4 6 , 4 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(4)DOT(6),
          arguments[1] = DEF(4),
          arguments[2] = DEF(6),
          arguments[2+1] = nil,& arguments[0]),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c12:
/* call 3.2.3.16 6 7 , 5 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(3)DOT(16),
          arguments[1] = DEF(6),
          arguments[2] = DEF(7),
          arguments[2+1] = nil,& arguments[0]),QUAL(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c13:
/* noop */
  
/* reveal 7.2 , 3 */
  if (3 != REF(7)DOT(2).value.variant->info.variant_case) goto ch_case_error;
/* size 8 7.2.0.1 */
  REF(8).value.integer = REF(7)DOT(2)DOT(0)DOT(1).value.table->size;
  REF(8).tsdr = & dr_integer;
/* notequal . 8 =(0) , 22 */
  if ( REF(8).value.integer != 0 ) goto c22;
/* 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;
/* exit , 6 */
  ch_e = handler_type__exit; ch_val = QUAL(6); goto ch_exception;
c22:
/* unique 9 */
  if ((ch_returncode = che_unique(DEF(9),sched)) != Normal)
     goto ch_raise_exception;
/* unique 10 */
  if ((ch_returncode = che_unique(DEF(10),sched)) != Normal)
     goto ch_raise_exception;
/* new_record 11 , 3 */
  if ((ch_val.record = new_record(3)) == nil) goto ch_depletion;
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).value = ch_val; REF(11).tsdr = & dr_record;
/* enum_lit 11.0 , 44 */
  REF(11)DOT(0).value.enumeration = 44;
  REF(11)DOT(0).tsdr = & dr_enumeration;
/* new_table 11.1 , 2 */
  if ((ch_returncode = che_new_table(DEF(11)DOT(1),QUAL(2),sched)) != Normal) 
     goto ch_raise_exception;
/* copy 12 5 */
  if((ch_returncode = (REF(5).tsdr->copy)(& ch_val, REF(5).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12).value = ch_val;
  REF(12).tsdr = datarepmap[REF(5).tsdr->number];
/* insert 11.1 12 */
  if ((ch_returncode = insertfunc(DEF(11)DOT(1),DEF(12),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* unite 11.2 13 , 0 */
  if ((ch_returncode = che_unite(DEF(11)DOT(2),DEF(13),sched,0)) != Normal)
     goto ch_raise_exception;
/* insert 3.2.4.3.1 11 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(3)DOT(1),DEF(11)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
/* copy 14 9 */
  if((ch_returncode = cp_nominal(& ch_val, REF(9).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  REF(14).value = ch_val;
  REF(14).tsdr = & dr_nominal;
/* unite 3.2.4.3.2 14 , 0 */
  if ((ch_returncode = che_unite(DEF(3)DOT(2)DOT(4)DOT(3)DOT(2),DEF(14),sched,
    0)) != Normal) goto ch_raise_exception;
/* copy 15 3.2.4.3.0 */
  if((ch_returncode = cp_nominal(& ch_val, 
    REF(3)DOT(2)DOT(4)DOT(3)DOT(0).value)) != Normal) goto ch_raise_exception;
  (*(REF(15).tsdr)->finalize)(REF(15).value,F_DISCARD,sched);
  REF(15).value = ch_val;
  REF(15).tsdr = & dr_nominal;
/* insert 3.2.4.2.2 15 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(2)DOT(2),DEF(15)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
/* insert 3.2.4.2.0 3.2.4.3 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(2)DOT(0),
    DEF(3)DOT(2)DOT(4)DOT(3),FALSE,0)) != Normal) goto ch_raise_exception;
/* new_record 3.2.4.3 , 3 */
  if ((ch_val.record = new_record(3)) == nil) goto ch_depletion;
  (*(REF(3)DOT(2)DOT(4)DOT(3).tsdr)->finalize)(REF(3)DOT(2)DOT(4)DOT(3).value
    ,F_DISCARD,sched);
  REF(3)DOT(2)DOT(4)DOT(3).value = ch_val; REF(3)DOT(2)DOT(4)DOT(3).tsdr
     = & dr_record;
/* copy 3.2.4.3.0 9 */
  if((ch_returncode = cp_nominal(& ch_val, REF(9).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(3)DOT(2)DOT(4)DOT(3)DOT(0).tsdr)->finalize)(
    REF(3)DOT(2)DOT(4)DOT(3)DOT(0).value,F_DISCARD,sched);
  REF(3)DOT(2)DOT(4)DOT(3)DOT(0).value = ch_val;
  REF(3)DOT(2)DOT(4)DOT(3)DOT(0).tsdr = & dr_nominal;
/* new_table 3.2.4.3.1 , 2 */
  if ((ch_returncode = che_new_table(DEF(3)DOT(2)DOT(4)DOT(3)DOT(1),QUAL(2)
    ,sched)) != Normal)  goto ch_raise_exception;
/* unite 3.2.4.3.2 13 , 6 */
  if ((ch_returncode = che_unite(DEF(3)DOT(2)DOT(4)DOT(3)DOT(2),DEF(13),sched,
    6)) != Normal) goto ch_raise_exception;
/* find 16 3.2.4.0.1.0 3.0.3.0.0 , 0 */
  if (findfunc(DEF(16),DEF(3)DOT(2)DOT(4)DOT(0)DOT(1)DOT(0),(
          arguments[0] = DEF(3)DOT(0)DOT(3)DOT(0)DOT(0),& arguments[0]),sched,0
            ) == FAILURE) goto ch_notfound;
  current->ip = 8;
cb48:
/* call 3.2.3.2 16.2 3.2 , 7 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(3)DOT(2),
          arguments[1] = DEF(16)DOT(2),
          arguments[2] = DEF(3)DOT(2),
          arguments[2+1] = nil,& arguments[0]),QUAL(7),sched)) != Normal)
     goto ch_raise_exception;
  return;
c49:
/* new_record 11 , 3 */
  if ((ch_val.record = new_record(3)) == nil) goto ch_depletion;
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).value = ch_val; REF(11).tsdr = & dr_record;
/* enum_lit 11.0 , 45 */
  REF(11)DOT(0).value.enumeration = 45;
  REF(11)DOT(0).tsdr = & dr_enumeration;
/* new_table 11.1 , 2 */
  if ((ch_returncode = che_new_table(DEF(11)DOT(1),QUAL(2),sched)) != Normal) 
     goto ch_raise_exception;
/* insert 11.1 5 */
  if ((ch_returncode = insertfunc(DEF(11)DOT(1),DEF(5),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* new_record 17 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(17).tsdr)->finalize)(REF(17).value,F_DISCARD,sched);
  REF(17).value = ch_val; REF(17).tsdr = & dr_record;
/* ilit 17.0 , 0 */
  REF(17)DOT(0).value.integer = 0;
  REF(17)DOT(0).tsdr = & dr_integer;
/* size 17.1 7.2.0.1 */
  REF(17)DOT(1).value.integer = REF(7)DOT(2)DOT(0)DOT(1).value.table->size;
  REF(17)DOT(1).tsdr = & dr_integer;
/* unite 11.2 17 , 5 */
  if ((ch_returncode = che_unite(DEF(11)DOT(2),DEF(17),sched,5)) != Normal)
     goto ch_raise_exception;
/* new_record 18 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(18).tsdr)->finalize)(REF(18).value,F_DISCARD,sched);
  REF(18).value = ch_val; REF(18).tsdr = & dr_record;
/* copy 18.1 10 */
  if((ch_returncode = cp_nominal(& ch_val, REF(10).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(18)DOT(1).tsdr)->finalize)(REF(18)DOT(1).value,F_DISCARD,sched);
  REF(18)DOT(1).value = ch_val;
  REF(18)DOT(1).tsdr = & dr_nominal;
/* move 18.0 9 */
  (*(REF(18)DOT(0).tsdr)->finalize)(REF(18)DOT(0).value,F_DISCARD,sched);
  REF(18)DOT(0) = REF(9);
  REF(9).tsdr = & dr_bottom;
/* unite 3.2.4.3.2 18 , 2 */
  if ((ch_returncode = che_unite(DEF(3)DOT(2)DOT(4)DOT(3)DOT(2),DEF(18),sched,
    2)) != Normal) goto ch_raise_exception;
/* insert 3.2.4.3.1 11 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(3)DOT(1),DEF(11)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
/* copy 19 3.2.4.3.0 */
  if((ch_returncode = cp_nominal(& ch_val, 
    REF(3)DOT(2)DOT(4)DOT(3)DOT(0).value)) != Normal) goto ch_raise_exception;
  (*(REF(19).tsdr)->finalize)(REF(19).value,F_DISCARD,sched);
  REF(19).value = ch_val;
  REF(19).tsdr = & dr_nominal;
/* insert 3.2.4.2.2 19 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(2)DOT(2),DEF(19)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
/* insert 3.2.4.2.0 3.2.4.3 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(2)DOT(0),
    DEF(3)DOT(2)DOT(4)DOT(3),FALSE,0)) != Normal) goto ch_raise_exception;
/* new_record 3.2.4.3 , 3 */
  if ((ch_val.record = new_record(3)) == nil) goto ch_depletion;
  (*(REF(3)DOT(2)DOT(4)DOT(3).tsdr)->finalize)(REF(3)DOT(2)DOT(4)DOT(3).value
    ,F_DISCARD,sched);
  REF(3)DOT(2)DOT(4)DOT(3).value = ch_val; REF(3)DOT(2)DOT(4)DOT(3).tsdr
     = & dr_record;
/* move 3.2.4.3.0 10 */
  (*(REF(3)DOT(2)DOT(4)DOT(3)DOT(0).tsdr)->finalize)(
    REF(3)DOT(2)DOT(4)DOT(3)DOT(0).value,F_DISCARD,sched);
  REF(3)DOT(2)DOT(4)DOT(3)DOT(0) = REF(10);
  REF(10).tsdr = & dr_bottom;
/* new_table 3.2.4.3.1 , 2 */
  if ((ch_returncode = che_new_table(DEF(3)DOT(2)DOT(4)DOT(3)DOT(1),QUAL(2)
    ,sched)) != Normal)  goto ch_raise_exception;
/* unite 3.2.4.3.2 13 , 6 */
  if ((ch_returncode = che_unite(DEF(3)DOT(2)DOT(4)DOT(3)DOT(2),DEF(13),sched,
    6)) != Normal) goto ch_raise_exception;
/* 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);
c79:
/* discard 5 */
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c82:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
