#include "chdecl.h"
void CH_chcode_chencodings_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 c73;
    case 4: goto cb73;
    case 5: goto c74;
    case 6: goto c102;
    case 7: goto c103;
    case 8: goto c106;
    case 9: goto c108;
    case 10: goto c110;
    case 11: goto c114;  }
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:
/* new_inport 4 */
  if ((ch_val.inport = make_inport()) == nil) goto ch_depletion;
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).value = ch_val; REF(4).tsdr = & dr_inport;
/* connect 3.0 4 */
  if (REF(4).value.inport->refcount == MAXCOUNTER) goto ch_depletion;
  (*(REF(3)DOT(0).tsdr)->finalize)(REF(3)DOT(0).value,F_DISCARD,sched);
  REF(4).value.inport->refcount++;
  REF(3)DOT(0).value.outport = REF(4).value.inport;
  REF(3)DOT(0).tsdr = & dr_outport;
/* 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;
/* new_table 5 , 2 */
  if ((ch_returncode = che_new_table(DEF(5),QUAL(2),sched)) != Normal) 
     goto ch_raise_exception;
/* chs_lit 6 , "boolean" */
  if( !chs_lit(DEF(6),"boolean") ) goto ch_depletion;
/* insert_at 5 6 =(0) */
  if ((ch_returncode = insertfunc(DEF(5),DEF(6),TRUE, 0)) != Normal)
     goto ch_raise_exception;
/* chs_lit 7 , "enumeration" */
  if( !chs_lit(DEF(7),"enumeration") ) goto ch_depletion;
/* insert_at 5 7 =(1) */
  if (REF(5).value.table->size < 1) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(7),TRUE, 1)) != Normal)
     goto ch_raise_exception;
/* chs_lit 8 , "ord_enumeration" */
  if( !chs_lit(DEF(8),"ord_enumeration") ) goto ch_depletion;
/* insert_at 5 8 =(2) */
  if (REF(5).value.table->size < 2) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(8),TRUE, 2)) != Normal)
     goto ch_raise_exception;
/* chs_lit 9 , "integer" */
  if( !chs_lit(DEF(9),"integer") ) goto ch_depletion;
/* insert_at 5 9 =(3) */
  if (REF(5).value.table->size < 3) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(9),TRUE, 3)) != Normal)
     goto ch_raise_exception;
/* chs_lit 10 , "real" */
  if( !chs_lit(DEF(10),"real") ) goto ch_depletion;
/* insert_at 5 10 =(4) */
  if (REF(5).value.table->size < 4) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(10),TRUE, 4)) != Normal)
     goto ch_raise_exception;
/* chs_lit 11 , "table" */
  if( !chs_lit(DEF(11),"table") ) goto ch_depletion;
/* insert_at 5 11 =(5) */
  if (REF(5).value.table->size < 5) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(11),TRUE, 5)) != Normal)
     goto ch_raise_exception;
/* chs_lit 12 , "nominal" */
  if( !chs_lit(DEF(12),"nominal") ) goto ch_depletion;
/* insert_at 5 12 =(6) */
  if (REF(5).value.table->size < 6) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(12),TRUE, 6)) != Normal)
     goto ch_raise_exception;
/* chs_lit 13 , "record" */
  if( !chs_lit(DEF(13),"record") ) goto ch_depletion;
/* insert_at 5 13 =(7) */
  if (REF(5).value.table->size < 7) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(13),TRUE, 7)) != Normal)
     goto ch_raise_exception;
/* chs_lit 14 , "polymorph" */
  if( !chs_lit(DEF(14),"polymorph") ) goto ch_depletion;
/* insert_at 5 14 =(8) */
  if (REF(5).value.table->size < 8) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(14),TRUE, 8)) != Normal)
     goto ch_raise_exception;
/* chs_lit 15 , "inport" */
  if( !chs_lit(DEF(15),"inport") ) goto ch_depletion;
/* insert_at 5 15 =(9) */
  if (REF(5).value.table->size < 9) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(15),TRUE, 9)) != Normal)
     goto ch_raise_exception;
/* chs_lit 16 , "outport" */
  if( !chs_lit(DEF(16),"outport") ) goto ch_depletion;
/* insert_at 5 16 =(10) */
  if (REF(5).value.table->size < 10) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(16),TRUE, 10)) != Normal)
     goto ch_raise_exception;
/* chs_lit 17 , "callmessage" */
  if( !chs_lit(DEF(17),"callmessage") ) goto ch_depletion;
/* insert_at 5 17 =(11) */
  if (REF(5).value.table->size < 11) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(17),TRUE, 11)) != Normal)
     goto ch_raise_exception;
/* chs_lit 18 , "program" */
  if( !chs_lit(DEF(18),"program") ) goto ch_depletion;
/* insert_at 5 18 =(12) */
  if (REF(5).value.table->size < 12) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(18),TRUE, 12)) != Normal)
     goto ch_raise_exception;
/* chs_lit 19 , "variant" */
  if( !chs_lit(DEF(19),"variant") ) goto ch_depletion;
/* insert_at 5 19 =(13) */
  if (REF(5).value.table->size < 13) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(19),TRUE, 13)) != Normal)
     goto ch_raise_exception;
/* chs_lit 20 , "table" */
  if( !chs_lit(DEF(20),"table") ) goto ch_depletion;
/* insert_at 5 20 =(14) */
  if (REF(5).value.table->size < 14) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(20),TRUE, 14)) != Normal)
     goto ch_raise_exception;
/* chs_lit 21 , "unknown" */
  if( !chs_lit(DEF(21),"unknown") ) goto ch_depletion;
/* insert_at 5 21 =(15) */
  if (REF(5).value.table->size < 15) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(5),DEF(21),TRUE, 15)) != Normal)
     goto ch_raise_exception;
c71:
/* noop */
  
c73:
  current->ip = 4;
cb73:
/* receive 22 4 */
  if ((ch_returncode = che_receive(DEF(22),DEF(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c74:
/* lookup_at 23 22.0 22.1 */
  if((ch_i = REF(22)DOT(1).value.integer) < 0 || ch_i >= (ch_t = 
    REF(22)DOT(0).value.table)->size) goto ch_notfound;
  (*(REF(23).tsdr)->finalize)(REF(23).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(23).value,ch_i);
  REF(23).tsdr = qdatarepmap[ch_t->tsdr->number];
/* equal . 23.1 =(15) , 80 */
  if ( REF(23)DOT(1).value.ord_enum == 15 ) goto c80;
/* copy 22.4 23.1 */
  REF(22)DOT(4) = REF(23)DOT(1);
/* branch , 82 */
   goto c82;
c80:
/* lookup_at 24 22.0 22.2 */
  if((ch_i = REF(22)DOT(2).value.integer) < 0 || ch_i >= (ch_t = 
    REF(22)DOT(0).value.table)->size) goto ch_notfound;
  (*(REF(24).tsdr)->finalize)(REF(24).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(24).value,ch_i);
  REF(24).tsdr = qdatarepmap[ch_t->tsdr->number];
/* copy 22.4 24.1 */
  REF(22)DOT(4) = REF(24)DOT(1);
c82:
/* block , 3 */
  if((ch_returncode = che_block(QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
/* new_record 25 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(25).tsdr)->finalize)(REF(25).value,F_DISCARD,sched);
  REF(25).value = ch_val; REF(25).tsdr = & dr_record;
/* enum_lit 25.0 , 4 */
  REF(25)DOT(0).value.enumeration = 4;
  REF(25)DOT(0).tsdr = & dr_enumeration;
/* oecvt_int 26 22.4 */
  REF(26).value.integer = REF(22)DOT(4).value.ord_enum;
  REF(26).tsdr = & dr_integer;
/* lookup_at 27 5 26 */
  if((ch_i = REF(26).value.integer) < 0 || ch_i >= (ch_t = REF(5).value
    .table)->size) goto ch_notfound;
  (*(REF(27).tsdr)->finalize)(REF(27).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(27).value,ch_i);
  REF(27).tsdr = qdatarepmap[ch_t->tsdr->number];
/* copy 25.1 27 */
  if((ch_returncode = cp_table(& ch_val, REF(27).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(25)DOT(1).tsdr)->finalize)(REF(25)DOT(1).value,F_DISCARD,sched);
  REF(25)DOT(1).value = ch_val;
  REF(25)DOT(1).tsdr = & dr_table;
/* copy 28 25 */
  if((ch_returncode = cp_record(& ch_val, REF(25).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(28).tsdr)->finalize)(REF(28).value,F_DISCARD,sched);
  REF(28).value = ch_val;
  REF(28).tsdr = & dr_record;
/* insert 22.3 28 */
  if ((ch_returncode = insertfunc(DEF(22)DOT(3),DEF(28),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* enum_lit 25.0 , 5 */
  REF(25)DOT(0).value.enumeration = 5;
  REF(25)DOT(0).tsdr = & dr_enumeration;
/* notequal . 22.4 =(2) , 99 */
  if ( REF(22)DOT(4).value.ord_enum != 2 ) goto c99;
/* chs_lit 25.1 , "ord_enum" */
  if( !chs_lit(DEF(25)DOT(1),"ord_enum") ) goto ch_depletion;
c99:
/* insert 22.3 25 */
  if ((ch_returncode = insertfunc(DEF(22)DOT(3),DEF(25),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* endblock */
  che_endblock(sched);
/* branch , 103 */
   goto c103;
c102:
/* discard 28 */
  (*(REF(28).tsdr)->finalize)(REF(28).value,F_DISCARD,sched);
  REF(28).tsdr = & dr_bottom;
c103:
/* discard 25 */
  (*(REF(25).tsdr)->finalize)(REF(25).value,F_DISCARD,sched);
  REF(25).tsdr = & dr_bottom;
/* return 22 */
  if (ch_caller = do_return(REF(22).value)) {
    if (ch_caller->type < CProcess) ch_caller->ip++;
      sched->wakeup_proc(sched, ch_caller);}
  else rem_return(REF(22).value);
  REF(22).tsdr = & dr_bottom;
/* branch , 71 */
   goto c71;
c106:
/* endblock */
  che_endblock(sched);
/* branch , 110 */
   goto c110;
c108:
/* discard 4 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).tsdr = & dr_bottom;
/* discard 5 */
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).tsdr = & dr_bottom;
c110:
/* discard 4 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).tsdr = & dr_bottom;
/* discard 5 */
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c114:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
