#include "chdecl.h"
void CH_cache_objectcache(current, sched, cop)
#define ARGUMENTS 6
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb1;
    case 2: goto c2;
    case 5: goto c11;
    case 3: goto c13;
    case 4: goto cb13;
    case 6: goto c15;
    case 7: goto cb16;
    case 8: goto c17;
    case 9: goto c24;
    case 10: goto cb26;
    case 11: goto c27;
    case 12: goto c31;
    case 13: goto c34;
    case 14: goto c37;
    case 15: goto c40;
    case 16: goto cb41;
    case 17: goto c42;
    case 18: goto cb45;
    case 19: goto c46;
    case 20: goto cb55;
    case 21: goto c56;
    case 22: goto cb57;
    case 23: goto c58;
    case 24: goto c64;
    case 25: goto c66;
    case 26: goto c68;
    case 27: goto c69;
    case 28: goto c70;
    case 29: goto c73;
    case 30: goto cb77;
    case 31: goto c78;
    case 32: goto cb79;
    case 33: goto c80;
    case 34: goto c86;
    case 35: goto c88;
    case 36: goto c90;
    case 37: goto c91;
    case 38: goto c94;
    case 39: goto c96;  }
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:
/* copy 4 3.0 */
  if((ch_returncode = cp_outport(& ch_val, REF(3)DOT(0).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).value = ch_val;
  REF(4).tsdr = & dr_outport;
/* copy 5 3.1 */
  if((ch_returncode = cp_outport(& ch_val, REF(3)DOT(1).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).value = ch_val;
  REF(5).tsdr = & dr_outport;
/* copy 6 3.2 */
  if((ch_returncode = cp_outport(& ch_val, REF(3)DOT(2).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6).value = ch_val;
  REF(6).tsdr = & dr_outport;
/* new_inport 7 */
  if ((ch_val.inport = make_inport()) == nil) goto ch_depletion;
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).value = ch_val; REF(7).tsdr = & dr_inport;
/* connect 3.0 7 */
  if (REF(7).value.inport->refcount == MAXCOUNTER) goto ch_depletion;
  (*(REF(3)DOT(0).tsdr)->finalize)(REF(3)DOT(0).value,F_DISCARD,sched);
  REF(7).value.inport->refcount++;
  REF(3)DOT(0).value.outport = REF(7).value.inport;
  REF(3)DOT(0).tsdr = & dr_outport;
/* new_inport 8 */
  if ((ch_val.inport = make_inport()) == nil) goto ch_depletion;
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  REF(8).value = ch_val; REF(8).tsdr = & dr_inport;
/* connect 3.1 8 */
  if (REF(8).value.inport->refcount == MAXCOUNTER) goto ch_depletion;
  (*(REF(3)DOT(1).tsdr)->finalize)(REF(3)DOT(1).value,F_DISCARD,sched);
  REF(8).value.inport->refcount++;
  REF(3)DOT(1).value.outport = REF(8).value.inport;
  REF(3)DOT(1).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 9 , 1 */
  if ((ch_returncode = che_new_table(DEF(9),QUAL(1),sched)) != Normal) 
     goto ch_raise_exception;
c14:
c11:
/* noop */
  
c13:
  current->ip = 4;
cb13:
/* select 8 * 7 * , 2 */
  if ((ch_returncode = che_select((
          arguments[0] = DEF(8),
          arguments[1] = NO_OBJECT,
          arguments[2] = DEF(7),
          arguments[3] = NO_OBJECT,
          arguments[3+1] = nil,& arguments[0]),QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
  if (current->ip == 4) return; else COMPUTE_TARGET;
c15:
/* block , 3 */
  if((ch_returncode = che_block(QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
  current->ip = 7;
cb16:
/* receive 10 8 */
  if ((ch_returncode = che_receive(DEF(10),DEF(8),sched)) != Normal)
     goto ch_raise_exception;
  return;
c17:
/* block , 4 */
  if((ch_returncode = che_block(QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
/* privatize 9 */
  if (REF(9).value.table->refcount != 1)
    if ((ch_returncode = doCopyOnWrite(DEF(9))) != Normal)
       goto ch_raise_exception;
/* find 11 9 10.0 , 0 */
  if (findfunc(DEF(11),DEF(9),(
          arguments[0] = DEF(10)DOT(0),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* fremove 12 11 9 , 0 */
  if ((ch_returncode = removefunc(DEF(12),DEF(11),DEF(9),sched,0
    ,NO_TBL,(position *) nil)) != Normal) goto ch_raise_exception;
/* discard 12.2 */
  (*(REF(12)DOT(2).tsdr)->finalize)(REF(12)DOT(2).value,F_DISCARD,sched);
  REF(12)DOT(2).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
/* branch , 26 */
   goto c26;
c24:
/* new_record 12 , 3 */
  if ((ch_val.record = new_record(3)) == nil) goto ch_depletion;
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12).value = ch_val; REF(12).tsdr = & dr_record;
/* copy 12.0 10.0 */
  if((ch_returncode = (REF(10)DOT(0).tsdr->copy)(& ch_val, REF(10)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(12)DOT(0).tsdr)->finalize)(REF(12)DOT(0).value,F_DISCARD,sched);
  REF(12)DOT(0).value = ch_val;
  REF(12)DOT(0).tsdr = datarepmap[REF(10)DOT(0).tsdr->number];
c26:
  current->ip = 10;
cb26:
/* call 5 12.0 10.1 , 5 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(5),
          arguments[1] = DEF(12)DOT(0),
          arguments[2] = DEF(10)DOT(1),
          arguments[2+1] = nil,& arguments[0]),QUAL(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c27:
/* discard 12 */
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12).tsdr = & dr_bottom;
/* return 10 */
  if (ch_caller = do_return(REF(10).value)) {
    if (ch_caller->type < CProcess) ch_caller->ip++;
      sched->wakeup_proc(sched, ch_caller);}
  else rem_return(REF(10).value);
  REF(10).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
/* branch , 11 */
   goto c11;
c31:
/* discard 12 */
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12).tsdr = & dr_bottom;
/* return_exception 10 , 6 */
  if (ch_caller = do_return(REF(10).value)) {
    raise_user(QUAL(6),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(10),QUAL(6));
  REF(10).tsdr = & dr_bottom;
/* branch , 11 */
   goto c11;
c34:
/* discard 12 */
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12).tsdr = & dr_bottom;
/* return_exception 10 , 7 */
  if (ch_caller = do_return(REF(10).value)) {
    raise_user(QUAL(7),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(10),QUAL(7));
  REF(10).tsdr = & dr_bottom;
/* branch , 11 */
   goto c11;
c37:
/* discard 12 */
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12).tsdr = & dr_bottom;
/* return_exception 10 , 7 */
  if (ch_caller = do_return(REF(10).value)) {
    raise_user(QUAL(7),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(10),QUAL(7));
  REF(10).tsdr = & dr_bottom;
/* branch , 11 */
   goto c11;
c40:
/* block , 8 */
  if((ch_returncode = che_block(QUAL(8),sched)) != Normal)
     goto ch_raise_exception;
  current->ip = 16;
cb41:
/* receive 13 7 */
  if ((ch_returncode = che_receive(DEF(13),DEF(7),sched)) != Normal)
     goto ch_raise_exception;
  return;
c42:
/* find 14 9 13.0 , 0 */
  if (findfunc(DEF(14),DEF(9),(
          arguments[0] = DEF(13)DOT(0),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* copy 15 14 */
  if((ch_returncode = cp_record(& ch_val, REF(14).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_record;
  current->ip = 18;
cb45:
/* call 6 15.0 16 , 9 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(6),
          arguments[1] = DEF(15)DOT(0),
          arguments[2] = DEF(16),
          arguments[2+1] = nil,& arguments[0]),QUAL(9),sched)) != Normal)
     goto ch_raise_exception;
  return;
c46:
/* notequal . 15.1 16 , 51 */
  if ( !(REF(15)DOT(1).tsdr->equal)(REF(15)DOT(1).value,REF(16).value) )
     goto c51;
/* move 13.1 15.2 */
  (*(REF(13)DOT(1).tsdr)->finalize)(REF(13)DOT(1).value,F_DISCARD,sched);
  REF(13)DOT(1) = REF(15)DOT(2);
  REF(15)DOT(2).tsdr = & dr_bottom;
/* 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;
/* branch , 70 */
   goto c70;
c51:
/* block , 10 */
  if((ch_returncode = che_block(QUAL(10),sched)) != Normal)
     goto ch_raise_exception;
/* privatize 9 */
  if (REF(9).value.table->refcount != 1)
    if ((ch_returncode = doCopyOnWrite(DEF(9))) != Normal)
       goto ch_raise_exception;
/* find 17 9 13.0 , 0 */
  if (findfunc(DEF(17),DEF(9),(
          arguments[0] = DEF(13)DOT(0),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* fremove 15 17 9 , 0 */
  if ((ch_returncode = removefunc(DEF(15),DEF(17),DEF(9),sched,0
    ,NO_TBL,(position *) nil)) != Normal) goto ch_raise_exception;
  current->ip = 20;
cb55:
/* call 6 15.0 18 , 9 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(6),
          arguments[1] = DEF(15)DOT(0),
          arguments[2] = DEF(18),
          arguments[2+1] = nil,& arguments[0]),QUAL(9),sched)) != Normal)
     goto ch_raise_exception;
  return;
c56:
/* move 15.1 18 */
  (*(REF(15)DOT(1).tsdr)->finalize)(REF(15)DOT(1).value,F_DISCARD,sched);
  REF(15)DOT(1) = REF(18);
  REF(18).tsdr = & dr_bottom;
  current->ip = 22;
cb57:
/* call 4 15.0 19 , 11 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(4),
          arguments[1] = DEF(15)DOT(0),
          arguments[2] = DEF(19),
          arguments[2+1] = nil,& arguments[0]),QUAL(11),sched)) != Normal)
     goto ch_raise_exception;
  return;
c58:
/* move 15.2 19 */
  (*(REF(15)DOT(2).tsdr)->finalize)(REF(15)DOT(2).value,F_DISCARD,sched);
  REF(15)DOT(2) = REF(19);
  REF(19).tsdr = & dr_bottom;
/* copy 13.1 15.2 */
  if((ch_returncode = (REF(15)DOT(2).tsdr->copy)(& ch_val, REF(15)DOT(2).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(13)DOT(1).tsdr)->finalize)(REF(13)DOT(1).value,F_DISCARD,sched);
  REF(13)DOT(1).value = ch_val;
  REF(13)DOT(1).tsdr = datarepmap[REF(15)DOT(2).tsdr->number];
/* insert 9 15 */
  if ((ch_returncode = insertfunc(DEF(9),DEF(15),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;
/* endblock */
  che_endblock(sched);
/* branch , 69 */
   goto c69;
c64:
/* return_exception 13 , 12 */
  if (ch_caller = do_return(REF(13).value)) {
    raise_user(QUAL(12),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(13),QUAL(12));
  REF(13).tsdr = & dr_bottom;
/* branch , 69 */
   goto c69;
c66:
/* return_exception 13 , 13 */
  if (ch_caller = do_return(REF(13).value)) {
    raise_user(QUAL(13),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(13),QUAL(13));
  REF(13).tsdr = & dr_bottom;
/* branch , 69 */
   goto c69;
c68:
/* return_exception 13 , 12 */
  if (ch_caller = do_return(REF(13).value)) {
    raise_user(QUAL(12),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(13),QUAL(12));
  REF(13).tsdr = & dr_bottom;
c69:
/* discard 15 */
  (*(REF(15).tsdr)->finalize)(REF(15).value,F_DISCARD,sched);
  REF(15).tsdr = & dr_bottom;
c70:
/* discard 15 */
  (*(REF(15).tsdr)->finalize)(REF(15).value,F_DISCARD,sched);
  REF(15).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
/* branch , 11 */
   goto c11;
c73:
/* discard 15 */
  (*(REF(15).tsdr)->finalize)(REF(15).value,F_DISCARD,sched);
  REF(15).tsdr = & dr_bottom;
/* block , 14 */
  if((ch_returncode = che_block(QUAL(14),sched)) != Normal)
     goto ch_raise_exception;
/* new_record 15 , 3 */
  if ((ch_val.record = new_record(3)) == 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.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(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(13)DOT(0).tsdr->number];
  current->ip = 30;
cb77:
/* call 4 15.0 20 , 11 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(4),
          arguments[1] = DEF(15)DOT(0),
          arguments[2] = DEF(20),
          arguments[2+1] = nil,& arguments[0]),QUAL(11),sched)) != Normal)
     goto ch_raise_exception;
  return;
c78:
/* move 15.2 20 */
  (*(REF(15)DOT(2).tsdr)->finalize)(REF(15)DOT(2).value,F_DISCARD,sched);
  REF(15)DOT(2) = REF(20);
  REF(20).tsdr = & dr_bottom;
  current->ip = 32;
cb79:
/* call 6 15.0 21 , 9 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(6),
          arguments[1] = DEF(15)DOT(0),
          arguments[2] = DEF(21),
          arguments[2+1] = nil,& arguments[0]),QUAL(9),sched)) != Normal)
     goto ch_raise_exception;
  return;
c80:
/* move 15.1 21 */
  (*(REF(15)DOT(1).tsdr)->finalize)(REF(15)DOT(1).value,F_DISCARD,sched);
  REF(15)DOT(1) = REF(21);
  REF(21).tsdr = & dr_bottom;
/* copy 13.1 15.2 */
  if((ch_returncode = (REF(15)DOT(2).tsdr->copy)(& ch_val, REF(15)DOT(2).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(13)DOT(1).tsdr)->finalize)(REF(13)DOT(1).value,F_DISCARD,sched);
  REF(13)DOT(1).value = ch_val;
  REF(13)DOT(1).tsdr = datarepmap[REF(15)DOT(2).tsdr->number];
/* insert 9 15 */
  if ((ch_returncode = insertfunc(DEF(9),DEF(15),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;
/* endblock */
  che_endblock(sched);
/* branch , 91 */
   goto c91;
c86:
/* return_exception 13 , 12 */
  if (ch_caller = do_return(REF(13).value)) {
    raise_user(QUAL(12),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(13),QUAL(12));
  REF(13).tsdr = & dr_bottom;
/* branch , 91 */
   goto c91;
c88:
/* return_exception 13 , 13 */
  if (ch_caller = do_return(REF(13).value)) {
    raise_user(QUAL(13),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(13),QUAL(13));
  REF(13).tsdr = & dr_bottom;
/* branch , 91 */
   goto c91;
c90:
/* return_exception 13 , 12 */
  if (ch_caller = do_return(REF(13).value)) {
    raise_user(QUAL(12),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(13),QUAL(12));
  REF(13).tsdr = & dr_bottom;
c91:
/* discard 15 */
  (*(REF(15).tsdr)->finalize)(REF(15).value,F_DISCARD,sched);
  REF(15).tsdr = & dr_bottom;
/* branch , 11 */
   goto c11;
c94:
/* endblock */
  che_endblock(sched);
c96:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
