#include "chdecl.h"
void CH_codegen_objalias(current, sched, cop)
#define ARGUMENTS 8
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb2;
    case 2: goto c3;
    case 3: goto c18;
    case 4: goto cb18;
    case 6: goto cb20;
    case 7: goto c21;
    case 8: goto cb38;
    case 9: goto c39;
    case 10: goto c42;
    case 11: goto c44;
    case 12: goto cb45;
    case 13: goto c46;
    case 14: goto c56;
    case 15: goto cb58;
    case 16: goto c59;
    case 17: goto c62;
    case 18: goto cb68;
    case 19: goto c69;
    case 20: goto c74;
    case 21: goto c85;
    case 22: goto c88;
    case 23: goto c90;
    case 24: goto c91;
    case 5: goto c93;
    case 25: goto c93;
    case 26: goto c94;
    case 27: goto c98;
    case 28: goto c100;
    case 29: goto cb101;
    case 31: goto c103;
    case 30: goto c106;
    case 32: goto c106;
    case 33: goto c111;  }
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:
/* move 4 3.0 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4) = REF(3)DOT(0);
  REF(3)DOT(0).tsdr = & dr_bottom;
/* new_inport 3.0 */
  if ((ch_val.inport = make_inport()) == nil) goto ch_depletion;
  (*(REF(3)DOT(0).tsdr)->finalize)(REF(3)DOT(0).value,F_DISCARD,sched);
  REF(3)DOT(0).value = ch_val; REF(3)DOT(0).tsdr = & dr_inport;
/* connect 5 3.0 */
  if (REF(3)DOT(0).value.inport->refcount == MAXCOUNTER) goto ch_depletion;
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(3)DOT(0).value.inport->refcount++;
  REF(5).value.outport = REF(3)DOT(0).value.inport;
  REF(5).tsdr = & dr_outport;
/* move 6 3.1 */
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6) = REF(3)DOT(1);
  REF(3)DOT(1).tsdr = & dr_bottom;
/* new_inport 3.1 */
  if ((ch_val.inport = make_inport()) == nil) goto ch_depletion;
  (*(REF(3)DOT(1).tsdr)->finalize)(REF(3)DOT(1).value,F_DISCARD,sched);
  REF(3)DOT(1).value = ch_val; REF(3)DOT(1).tsdr = & dr_inport;
/* connect 7 3.1 */
  if (REF(3)DOT(1).value.inport->refcount == MAXCOUNTER) goto ch_depletion;
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(3)DOT(1).value.inport->refcount++;
  REF(7).value.outport = REF(3)DOT(1).value.inport;
  REF(7).tsdr = & dr_outport;
/* move 8 3.2 */
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  REF(8) = REF(3)DOT(2);
  REF(3)DOT(2).tsdr = & dr_bottom;
/* new_inport 3.2 */
  if ((ch_val.inport = make_inport()) == nil) goto ch_depletion;
  (*(REF(3)DOT(2).tsdr)->finalize)(REF(3)DOT(2).value,F_DISCARD,sched);
  REF(3)DOT(2).value = ch_val; REF(3)DOT(2).tsdr = & dr_inport;
/* move 9 3.3 */
  (*(REF(9).tsdr)->finalize)(REF(9).value,F_DISCARD,sched);
  REF(9) = REF(3)DOT(3);
  REF(3)DOT(3).tsdr = & dr_bottom;
/* move 10 3.5 */
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  REF(10) = REF(3)DOT(5);
  REF(3)DOT(5).tsdr = & dr_bottom;
/* move 11 3.4 */
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11) = REF(3)DOT(4);
  REF(3)DOT(4).tsdr = & dr_bottom;
/* 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 12 , 2 */
  if ((ch_returncode = che_new_table(DEF(12),QUAL(2),sched)) != Normal) 
     goto ch_raise_exception;
c16:
/* noop */
  
c18:
  current->ip = 4;
cb18:
/* select 8 * 6 * 4 * , 3 */
  if ((ch_returncode = che_select((
          arguments[0] = DEF(8),
          arguments[1] = NO_OBJECT,
          arguments[2] = DEF(6),
          arguments[3] = NO_OBJECT,
          arguments[4] = DEF(4),
          arguments[5] = NO_OBJECT,
          arguments[5+1] = nil,& arguments[0]),QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
  if (current->ip == 4) return; else COMPUTE_TARGET;
c20:
  current->ip = 6;
cb20:
/* receive 13 8 */
  if ((ch_returncode = che_receive(DEF(13),DEF(8),sched)) != Normal)
     goto ch_raise_exception;
  return;
c21:
/* size 14 13.1 */
  REF(14).value.integer = REF(13)DOT(1).value.table->size;
  REF(14).tsdr = & dr_integer;
/* notequal . 14 =(0) , 35 */
  if ( REF(14).value.integer != 0 ) goto c35;
/* privatize 12 */
  if (REF(12).value.table->refcount != 1)
    if ((ch_returncode = doCopyOnWrite(DEF(12))) != Normal)
       goto ch_raise_exception;
/* find 15 12 13.0 , 0 */
  if (findfunc(DEF(15),DEF(12),(
          arguments[0] = DEF(13)DOT(0),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* fremove 16 15 12 , 0 */
  if ((ch_returncode = removefunc(DEF(16),DEF(15),DEF(12),sched,0
    ,NO_TBL,(position *) nil)) != Normal) goto ch_raise_exception;
/* return 13 */
  if (ch_caller = do_return(REF(13).value)) {
    if (ch_caller->type < CProcess) ch_caller->ip++;
      sched->wakeup_proc(sched, ch_caller);}
  else rem_return(REF(13).value);
  REF(13).tsdr = & dr_bottom;
/* size 17 12 */
  REF(17).value.integer = REF(12).value.table->size;
  REF(17).tsdr = & dr_integer;
/* notequal . 17 =(0) , 42 */
  if ( REF(17).value.integer != 0 ) goto c42;
/* exit , 4 */
  ch_e = handler_type__exit; ch_val = QUAL(4); goto ch_exception;
c35:
/* new_record 16 , 3 */
  if ((ch_val.record = new_record(3)) == nil) goto ch_depletion;
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).value = ch_val; REF(16).tsdr = & dr_record;
/* copy 16.0 13.0 */
  if((ch_returncode = (REF(13)DOT(0).tsdr->copy)(& ch_val, REF(13)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(16)DOT(0).tsdr)->finalize)(REF(16)DOT(0).value,F_DISCARD,sched);
  REF(16)DOT(0).value = ch_val;
  REF(16)DOT(0).tsdr = datarepmap[REF(13)DOT(0).tsdr->number];
/* copy 16.1 13.1 */
  if((ch_returncode = cp_table(& ch_val, REF(13)DOT(1).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(16)DOT(1).tsdr)->finalize)(REF(16)DOT(1).value,F_DISCARD,sched);
  REF(16)DOT(1).value = ch_val;
  REF(16)DOT(1).tsdr = & dr_table;
  current->ip = 8;
cb38:
/* call 11 16.0 18 , 5 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(11),
          arguments[1] = DEF(16)DOT(0),
          arguments[2] = DEF(18),
          arguments[2+1] = nil,& arguments[0]),QUAL(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c39:
/* move 16.2 18 */
  (*(REF(16)DOT(2).tsdr)->finalize)(REF(16)DOT(2).value,F_DISCARD,sched);
  REF(16)DOT(2) = REF(18);
  REF(18).tsdr = & dr_bottom;
/* insert 12 16 */
  if ((ch_returncode = insertfunc(DEF(12),DEF(16),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* return 13 */
  if (ch_caller = do_return(REF(13).value)) {
    if (ch_caller->type < CProcess) ch_caller->ip++;
      sched->wakeup_proc(sched, ch_caller);}
  else rem_return(REF(13).value);
  REF(13).tsdr = & dr_bottom;
c42:
/* discard 16 */
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).tsdr = & dr_bottom;
/* branch , 94 */
   goto c94;
c44:
/* block , 6 */
  if((ch_returncode = che_block(QUAL(6),sched)) != Normal)
     goto ch_raise_exception;
  current->ip = 12;
cb45:
/* receive 19 6 */
  if ((ch_returncode = che_receive(DEF(19),DEF(6),sched)) != Normal)
     goto ch_raise_exception;
  return;
c46:
/* new_record 20 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(20).tsdr)->finalize)(REF(20).value,F_DISCARD,sched);
  REF(20).value = ch_val; REF(20).tsdr = & dr_record;
/* new_record 20.0 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(20)DOT(0).tsdr)->finalize)(REF(20)DOT(0).value,F_DISCARD,sched);
  REF(20)DOT(0).value = ch_val; REF(20)DOT(0).tsdr = & dr_record;
/* copy 20.0.1 19.0 */
  if((ch_returncode = (REF(19)DOT(0).tsdr->copy)(& ch_val, REF(19)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(20)DOT(0)DOT(1).tsdr)->finalize)(REF(20)DOT(0)DOT(1).value
    ,F_DISCARD,sched);
  REF(20)DOT(0)DOT(1).value = ch_val;
  REF(20)DOT(0)DOT(1).tsdr = datarepmap[REF(19)DOT(0).tsdr->number];
/* copy 20.0.0 19.1 */
  if((ch_returncode = (REF(19)DOT(1).tsdr->copy)(& ch_val, REF(19)DOT(1).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(20)DOT(0)DOT(0).tsdr)->finalize)(REF(20)DOT(0)DOT(0).value
    ,F_DISCARD,sched);
  REF(20)DOT(0)DOT(0).value = ch_val;
  REF(20)DOT(0)DOT(0).tsdr = datarepmap[REF(19)DOT(1).tsdr->number];
/* new_table 20.1 , 7 */
  if ((ch_returncode = che_new_table(DEF(20)DOT(1),QUAL(7),sched)) != Normal) 
     goto ch_raise_exception;
/* find 21 12 20 , 0 */
  if (findfunc(DEF(21),DEF(12),(
          arguments[0] = DEF(20),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* copy 19.2 21.1 */
  if((ch_returncode = (REF(21)DOT(1).tsdr->copy)(& ch_val, REF(21)DOT(1).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(19)DOT(2).tsdr)->finalize)(REF(19)DOT(2).value,F_DISCARD,sched);
  REF(19)DOT(2).value = ch_val;
  REF(19)DOT(2).tsdr = datarepmap[REF(21)DOT(1).tsdr->number];
/* return 19 */
  if (ch_caller = do_return(REF(19).value)) {
    if (ch_caller->type < CProcess) ch_caller->ip++;
      sched->wakeup_proc(sched, ch_caller);}
  else rem_return(REF(19).value);
  REF(19).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
/* branch , 94 */
   goto c94;
c56:
/* send 7 19 */
  if ((ch_returncode = che_send(DEF(7),DEF(19),sched)) != Normal)
     goto ch_raise_exception;
/* branch , 94 */
   goto c94;
c58:
  current->ip = 15;
cb58:
/* receive 22 4 */
  if ((ch_returncode = che_receive(DEF(22),DEF(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c59:
/* copy 23 22.0 */
  if((ch_returncode = (REF(22)DOT(0).tsdr->copy)(& ch_val, REF(22)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(23).tsdr)->finalize)(REF(23).value,F_DISCARD,sched);
  REF(23).value = ch_val;
  REF(23).tsdr = datarepmap[REF(22)DOT(0).tsdr->number];
/* new_table 24 , 7 */
  if ((ch_returncode = che_new_table(DEF(24),QUAL(7),sched)) != Normal) 
     goto ch_raise_exception;
/* block , 8 */
  if((ch_returncode = che_block(QUAL(8),sched)) != Normal)
     goto ch_raise_exception;
c62:
/* noop */
  
/* block , 9 */
  if((ch_returncode = che_block(QUAL(9),sched)) != Normal)
     goto ch_raise_exception;
/* find 25 12 23 , 0 */
  if (findfunc(DEF(25),DEF(12),(
          arguments[0] = DEF(23),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* copy 22.1 25.1 */
  if((ch_returncode = cp_table(& ch_val, REF(25)DOT(1).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(22)DOT(1).tsdr)->finalize)(REF(22)DOT(1).value,F_DISCARD,sched);
  REF(22)DOT(1).value = ch_val;
  REF(22)DOT(1).tsdr = & dr_table;
/* copy 26 25.2 */
  if((ch_returncode = (REF(25)DOT(2).tsdr->copy)(& ch_val, REF(25)DOT(2).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(26).tsdr)->finalize)(REF(26).value,F_DISCARD,sched);
  REF(26).value = ch_val;
  REF(26).tsdr = datarepmap[REF(25)DOT(2).tsdr->number];
  current->ip = 18;
cb68:
/* call 10 26 24 27 , 10 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(10),
          arguments[1] = DEF(26),
          arguments[2] = DEF(24),
          arguments[3] = DEF(27),
          arguments[3+1] = nil,& arguments[0]),QUAL(10),sched)) != Normal)
     goto ch_raise_exception;
  return;
c69:
/* merge 22.1 27 */
  if ((ch_returncode = mergefunc(DEF(22)DOT(1),DEF(27),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* 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;
/* exit , 11 */
  ch_e = handler_type__exit; ch_val = QUAL(11); goto ch_exception;
/* endblock */
  che_endblock(sched);
/* branch , 62 */
   goto c62;
c74:
/* block , 12 */
  if((ch_returncode = che_block(QUAL(12),sched)) != Normal)
     goto ch_raise_exception;
/* privatize 23.1 */
  if (REF(23)DOT(1).value.table->refcount != 1)
    if ((ch_returncode = doCopyOnWrite(DEF(23)DOT(1))) != Normal)
       goto ch_raise_exception;
/* size 28 23.1 */
  REF(28).value.integer = REF(23)DOT(1).value.table->size;
  REF(28).tsdr = & dr_integer;
/* isubtract 29 28 =(1) */
  if (!chf_isubtract(DEF(29),REF(28).value.integer,1)) goto ch_depletion;
/* lookup_at 30 23.1 29 */
  if((ch_i = REF(29).value.integer) < 0 || ch_i >= (ch_t = REF(23)DOT(1).value
    .table)->size) goto ch_notfound;
  (*(REF(30).tsdr)->finalize)(REF(30).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(30).value,ch_i);
  REF(30).tsdr = qdatarepmap[ch_t->tsdr->number];
/* remove_at 31 23.1 29 */
  if ((ch_returncode = remove_at_func(DEF(31),DEF(23)DOT(1),
    REF(29).value.integer)) != Normal) goto ch_raise_exception;
/* insert_at 24 31 =(0) */
  if ((ch_returncode = insertfunc(DEF(24),DEF(31),TRUE, 0)) != Normal)
     goto ch_raise_exception;
/* endblock */
  che_endblock(sched);
/* branch , 62 */
   goto c62;
c85:
/* send 5 22 */
  if ((ch_returncode = che_send(DEF(5),DEF(22),sched)) != Normal)
     goto ch_raise_exception;
/* exit , 11 */
  ch_e = handler_type__exit; ch_val = QUAL(11); goto ch_exception;
c88:
/* endblock */
  che_endblock(sched);
/* branch , 91 */
   goto c91;
c90:
/* discard 26 */
  (*(REF(26).tsdr)->finalize)(REF(26).value,F_DISCARD,sched);
  REF(26).tsdr = & dr_bottom;
c91:
/* discard 22 */
  (*(REF(22).tsdr)->finalize)(REF(22).value,F_DISCARD,sched);
  REF(22).tsdr = & dr_bottom;
/* branch , 94 */
   goto c94;
c19:
c93:
/* exit , 13 */
  ch_e = handler_type__exit; ch_val = QUAL(13); goto ch_exception;
c94:
/* discard 23 */
  (*(REF(23).tsdr)->finalize)(REF(23).value,F_DISCARD,sched);
  REF(23).tsdr = & dr_bottom;
/* discard 24 */
  (*(REF(24).tsdr)->finalize)(REF(24).value,F_DISCARD,sched);
  REF(24).tsdr = & dr_bottom;
/* discard 20 */
  (*(REF(20).tsdr)->finalize)(REF(20).value,F_DISCARD,sched);
  REF(20).tsdr = & dr_bottom;
/* branch , 16 */
   goto c16;
c98:
/* endblock */
  che_endblock(sched);
/* branch , 106 */
   goto c106;
c100:
/* discard 16 */
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).tsdr = & dr_bottom;
  current->ip = 29;
cb101:
/* call 9 4 6 8 , 14 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(9),
          arguments[1] = DEF(4),
          arguments[2] = DEF(6),
          arguments[3] = DEF(8),
          arguments[3+1] = nil,& arguments[0]),QUAL(14),sched)) != Normal)
     goto ch_raise_exception;
  return;
c103:
/* chs_lit 32 , "CantHappen exit taken in objalias" */
  if( !chs_lit(DEF(32),"CantHappen exit taken in objalias") )
     goto ch_depletion;
/* print 32 */
  re_print(stderr, 0, DEF(32)); fflush(stderr);
/* discard 32 */
  (*(REF(32).tsdr)->finalize)(REF(32).value,F_DISCARD,sched);
  REF(32).tsdr = & dr_bottom;
c102:
c106:
/* discard 4 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).tsdr = & dr_bottom;
/* discard 6 */
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6).tsdr = & dr_bottom;
/* discard 8 */
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  REF(8).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c111:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
