#include "chdecl.h"
void CH_codegen_cginsptbl(current, sched, cop)
#define ARGUMENTS 10
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb1;
    case 2: goto c2;
    case 3: goto cb7;
    case 4: goto c8;
    case 5: goto cb9;
    case 6: goto c10;
    case 7: goto cb11;
    case 8: goto c13;
    case 9: goto cb13;
    case 10: goto c14;
    case 11: goto cb20;
    case 12: goto c21;
    case 13: goto cb30;
    case 14: goto c31;
    case 15: goto cb32;
    case 16: goto c33;
    case 17: goto cb36;
    case 18: goto c38;
    case 19: goto c41;  }
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 , 9 */
  if (9 != REF(3)DOT(0)DOT(3).value.variant->info.variant_case)
     goto ch_case_error;
/* lookup_at 4 3.0.2 =(0) */
  if ( !((ch_t = REF(3)DOT(0)DOT(2).value.table)->size) ) goto ch_notfound;
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(4).value,0);
  REF(4).tsdr = qdatarepmap[ch_t->tsdr->number];
/* copy 5 4 */
  if((ch_returncode = (REF(4).tsdr->copy)(& ch_val, REF(4).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).value = ch_val;
  REF(5).tsdr = datarepmap[REF(4).tsdr->number];
  current->ip = 3;
cb7:
/* call 3.2.4.4 5 6 , 1 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(4)DOT(4),
          arguments[1] = DEF(5),
          arguments[2] = DEF(6),
          arguments[2+1] = nil,& arguments[0]),QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
  return;
c8:
/* move 7 6 */
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7) = REF(6);
  REF(6).tsdr = & dr_bottom;
  current->ip = 5;
cb9:
/* call 3.2.4.6 5 8 , 2 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(4)DOT(6),
          arguments[1] = DEF(5),
          arguments[2] = DEF(8),
          arguments[2+1] = nil,& arguments[0]),QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
  return;
c10:
/* enum_lit 9 , 2 */
  REF(9).value.enumeration = 2;
  REF(9).tsdr = & dr_enumeration;
  current->ip = 7;
cb11:
/* call 3.2.3.10 3.0.3.0.2 3.2 8 9 10 7 11 , 3 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(3)DOT(10),
          arguments[1] = DEF(3)DOT(0)DOT(3)DOT(0)DOT(2),
          arguments[2] = DEF(3)DOT(2),
          arguments[3] = DEF(8),
          arguments[4] = DEF(9),
          arguments[5] = DEF(10),
          arguments[6] = DEF(7),
          arguments[7] = DEF(11),
          arguments[7+1] = nil,& arguments[0]),QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
  return;
c12:
c13:
  current->ip = 9;
cb13:
/* call 3.2.4.5 3.0.3.0.2.1 3.0.3.0.2.0 12 , 4 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(4)DOT(5),
          arguments[1] = DEF(3)DOT(0)DOT(3)DOT(0)DOT(2)DOT(1),
          arguments[2] = DEF(3)DOT(0)DOT(3)DOT(0)DOT(2)DOT(0),
          arguments[3] = DEF(12),
          arguments[3+1] = nil,& arguments[0]),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c14:
/* move 13 12 */
  (*(REF(13).tsdr)->finalize)(REF(13).value,F_DISCARD,sched);
  REF(13) = REF(12);
  REF(12).tsdr = & dr_bottom;
/* new_record 14 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  REF(14).value = ch_val; REF(14).tsdr = & dr_record;
/* new_record 14.0 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(14)DOT(0).tsdr)->finalize)(REF(14)DOT(0).value,F_DISCARD,sched);
  REF(14)DOT(0).value = ch_val; REF(14)DOT(0).tsdr = & dr_record;
/* copy 14.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(14)DOT(0)DOT(1).tsdr)->finalize)(REF(14)DOT(0)DOT(1).value
    ,F_DISCARD,sched);
  REF(14)DOT(0)DOT(1).value = ch_val;
  REF(14)DOT(0)DOT(1).tsdr = datarepmap[REF(3)DOT(0)DOT(3)DOT(0)DOT(1).tsdr
    ->number];
/* copy 14.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(14)DOT(0)DOT(0).tsdr)->finalize)(REF(14)DOT(0)DOT(0).value
    ,F_DISCARD,sched);
  REF(14)DOT(0)DOT(0).value = ch_val;
  REF(14)DOT(0)DOT(0).tsdr = datarepmap[REF(3)DOT(0)DOT(3)DOT(0)DOT(0).tsdr
    ->number];
/* new_table 14.1 , 5 */
  if ((ch_returncode = che_new_table(DEF(14)DOT(1),QUAL(5),sched)) != Normal) 
     goto ch_raise_exception;
  current->ip = 11;
cb20:
/* call 3.2.4.8 14 13 , 6 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(4)DOT(8),
          arguments[1] = DEF(14),
          arguments[2] = DEF(13),
          arguments[2+1] = nil,& arguments[0]),QUAL(6),sched)) != Normal)
     goto ch_raise_exception;
  return;
c21:
/* new_record 15 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(15).tsdr)->finalize)(REF(15).value,F_DISCARD,sched);
  REF(15).value = ch_val; REF(15).tsdr = & dr_record;
/* copy 15.1 3.0.3.0.2.1 */
  if((ch_returncode = (REF(3)DOT(0)DOT(3)DOT(0)DOT(2)DOT(1).tsdr->copy)
    (& ch_val, REF(3)DOT(0)DOT(3)DOT(0)DOT(2)DOT(1).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(15)DOT(1).tsdr)->finalize)(REF(15)DOT(1).value,F_DISCARD,sched);
  REF(15)DOT(1).value = ch_val;
  REF(15)DOT(1).tsdr = datarepmap[REF(3)DOT(0)DOT(3)DOT(0)DOT(2)DOT(1).tsdr
    ->number];
/* copy 15.0 3.0.3.0.2.0 */
  if((ch_returncode = (REF(3)DOT(0)DOT(3)DOT(0)DOT(2)DOT(0).tsdr->copy)
    (& ch_val, REF(3)DOT(0)DOT(3)DOT(0)DOT(2)DOT(0).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(15)DOT(0).tsdr)->finalize)(REF(15)DOT(0).value,F_DISCARD,sched);
  REF(15)DOT(0).value = ch_val;
  REF(15)DOT(0).tsdr = datarepmap[REF(3)DOT(0)DOT(3)DOT(0)DOT(2)DOT(0).tsdr
    ->number];
/* find 16 3.2.6.0 15 , 0 */
  if (findfunc(DEF(16),DEF(3)DOT(2)DOT(6)DOT(0),(
          arguments[0] = DEF(15),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* copy 17 16 */
  if((ch_returncode = (REF(16).tsdr->copy)(& ch_val, REF(16).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(17).tsdr)->finalize)(REF(17).value,F_DISCARD,sched);
  REF(17).value = ch_val;
  REF(17).tsdr = datarepmap[REF(16).tsdr->number];
/* copy 17.0 14.0 */
  if((ch_returncode = cp_record(& ch_val, REF(14)DOT(0).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(17)DOT(0).tsdr)->finalize)(REF(17)DOT(0).value,F_DISCARD,sched);
  REF(17)DOT(0).value = ch_val;
  REF(17)DOT(0).tsdr = & dr_record;
/* insert 3.2.6.0 17 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(6)DOT(0),DEF(17)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
/* find 18 3.2.4.0.1.0 3.0.3.0.0 , 0 */
  if (findfunc(DEF(18),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 = 13;
cb30:
/* call 3.2.3.2 18.2 3.2 , 7 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(3)DOT(2),
          arguments[1] = DEF(18)DOT(2),
          arguments[2] = DEF(3)DOT(2),
          arguments[2+1] = nil,& arguments[0]),QUAL(7),sched)) != Normal)
     goto ch_raise_exception;
  return;
c31:
/* new_table 19 , 5 */
  if ((ch_returncode = che_new_table(DEF(19),QUAL(5),sched)) != Normal) 
     goto ch_raise_exception;
  current->ip = 15;
cb32:
/* call 3.2.4.8 14 19 , 6 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(4)DOT(8),
          arguments[1] = DEF(14),
          arguments[2] = DEF(19),
          arguments[2+1] = nil,& arguments[0]),QUAL(6),sched)) != Normal)
     goto ch_raise_exception;
  return;
c33:
/* privatize 3.2.6.0 */
  if (REF(3)DOT(2)DOT(6)DOT(0).value.table->refcount != 1)
    if ((ch_returncode = doCopyOnWrite(DEF(3)DOT(2)DOT(6)DOT(0))) != Normal)
       goto ch_raise_exception;
/* find 20 3.2.6.0 14.0 , 0 */
  if (findfunc(DEF(20),DEF(3)DOT(2)DOT(6)DOT(0),(
          arguments[0] = DEF(14)DOT(0),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* fremove 21 20 3.2.6.0 , 0 */
  if ((ch_returncode = removefunc(DEF(21),DEF(20),DEF(3)DOT(2)DOT(6)DOT(0)
    ,sched,0,NO_TBL,(position *) nil)) != Normal) goto ch_raise_exception;
  current->ip = 17;
cb36:
/* call 11 3.2 , 8 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(11),
          arguments[1] = DEF(3)DOT(2),
          arguments[1+1] = nil,& arguments[0]),QUAL(8),sched)) != Normal)
     goto ch_raise_exception;
  return;
c38:
/* 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);
c41:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
