#include "chdecl.h"
void CH_codegen_cginsppoly(current, sched, cop)
#define ARGUMENTS 5
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb1;
    case 2: goto c2;
    case 3: goto cb8;
    case 4: goto c10;
    case 5: goto cb10;
    case 6: goto c11;
    case 7: goto cb21;
    case 8: goto c22;
    case 9: goto cb30;
    case 10: goto c31;
    case 11: goto c43;  }
c0:
/* block , 0 */
  if((ch_returncode = che_block(QUAL(0),sched)) != Normal)
     goto ch_raise_exception;
  current->ip = 1;
cb1:
/* receive 3 0 */
  if ((ch_returncode = che_receive(DEF(3),DEF(0),sched)) != Normal)
     goto ch_raise_exception;
  return;
c2:
/* reveal 3.0.3 , 8 */
  if (8 != 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 , 1 */
  if ((ch_returncode = che_new_table(DEF(4)DOT(1),QUAL(1),sched)) != Normal) 
     goto ch_raise_exception;
  current->ip = 3;
cb8:
/* call 3.2.4.4 4 5 , 2 */
  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(2),sched)) != Normal)
     goto ch_raise_exception;
  return;
c9:
c10:
  current->ip = 5;
cb10:
/* call 3.2.4.6 4 6 , 3 */
  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(3),sched)) != Normal)
     goto ch_raise_exception;
  return;
c11:
/* noop */
  
/* new_record 7 , 3 */
  if ((ch_val.record = new_record(3)) == nil) goto ch_depletion;
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).value = ch_val; REF(7).tsdr = & dr_record;
/* enum_lit 7.0 , 81 */
  REF(7)DOT(0).value.enumeration = 81;
  REF(7)DOT(0).tsdr = & dr_enumeration;
/* new_table 7.1 , 1 */
  if ((ch_returncode = che_new_table(DEF(7)DOT(1),QUAL(1),sched)) != Normal) 
     goto ch_raise_exception;
/* copy 8 5 */
  if((ch_returncode = (REF(5).tsdr->copy)(& ch_val, REF(5).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  REF(8).value = ch_val;
  REF(8).tsdr = datarepmap[REF(5).tsdr->number];
/* insert 7.1 8 */
  if ((ch_returncode = insertfunc(DEF(7)DOT(1),DEF(8),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* lookup_at 9 3.0.2 =(0) */
  if ( !((ch_t = REF(3)DOT(0)DOT(2).value.table)->size) ) goto ch_notfound;
  (*(REF(9).tsdr)->finalize)(REF(9).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(9).value,0);
  REF(9).tsdr = qdatarepmap[ch_t->tsdr->number];
/* copy 10 9 */
  if((ch_returncode = (REF(9).tsdr->copy)(& ch_val, REF(9).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(9).tsdr->number];
  current->ip = 7;
cb21:
/* call 3.2.4.4 10 11 , 2 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(4)DOT(4),
          arguments[1] = DEF(10),
          arguments[2] = DEF(11),
          arguments[2+1] = nil,& arguments[0]),QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
  return;
c22:
/* insert 7.1 11 */
  if ((ch_returncode = insertfunc(DEF(7)DOT(1),DEF(11),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* new_record 12 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12).value = ch_val; REF(12).tsdr = & dr_record;
/* move 12.0 6 */
  (*(REF(12)DOT(0).tsdr)->finalize)(REF(12)DOT(0).value,F_DISCARD,sched);
  REF(12)DOT(0) = REF(6);
  REF(6).tsdr = & dr_bottom;
/* copy 12.1 3.0.3.0.2 */
  if((ch_returncode = (REF(3)DOT(0)DOT(3)DOT(0)DOT(2).tsdr->copy)(& ch_val, 
    REF(3)DOT(0)DOT(3)DOT(0)DOT(2).value)) != Normal) goto ch_raise_exception;
  (*(REF(12)DOT(1).tsdr)->finalize)(REF(12)DOT(1).value,F_DISCARD,sched);
  REF(12)DOT(1).value = ch_val;
  REF(12)DOT(1).tsdr = datarepmap[REF(3)DOT(0)DOT(3)DOT(0)DOT(2).tsdr
    ->number];
/* unite 7.2 12 , 6 */
  if ((ch_returncode = che_unite(DEF(7)DOT(2),DEF(12),sched,6)) != Normal)
     goto ch_raise_exception;
/* insert 3.2.4.3.1 7 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(3)DOT(1),DEF(7)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
/* find 13 3.2.4.0.1.0 3.0.3.0.0 , 0 */
  if (findfunc(DEF(13),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 = 9;
cb30:
/* call 3.2.3.2 13.2 3.2 , 4 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(3)DOT(2),
          arguments[1] = DEF(13)DOT(2),
          arguments[2] = DEF(3)DOT(2),
          arguments[2+1] = nil,& arguments[0]),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c31:
/* new_record 7 , 3 */
  if ((ch_val.record = new_record(3)) == nil) goto ch_depletion;
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).value = ch_val; REF(7).tsdr = & dr_record;
/* enum_lit 7.0 , 82 */
  REF(7)DOT(0).value.enumeration = 82;
  REF(7)DOT(0).tsdr = & dr_enumeration;
/* new_table 7.1 , 1 */
  if ((ch_returncode = che_new_table(DEF(7)DOT(1),QUAL(1),sched)) != Normal) 
     goto ch_raise_exception;
/* insert 7.1 5 */
  if ((ch_returncode = insertfunc(DEF(7)DOT(1),DEF(5),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* unite 7.2 14 , 0 */
  if ((ch_returncode = che_unite(DEF(7)DOT(2),DEF(14),sched,0)) != Normal)
     goto ch_raise_exception;
/* insert 3.2.4.3.1 7 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(3)DOT(1),DEF(7)
    ,FALSE,0)) != 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);
c43:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
