#include "chdecl.h"
void CH_rshelld_rshellac(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 3: goto c7;
    case 4: goto cb16;
    case 5: goto c17;
    case 6: goto cb21;
    case 7: goto c22;
    case 8: goto cb28;
    case 9: goto c29;
    case 10: goto cb34;
    case 11: goto c35;
    case 12: goto cb39;
    case 13: goto c40;
    case 14: goto c44;
    case 15: goto c46;  }
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 = (REF(3)DOT(0).tsdr->copy)(& 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 = datarepmap[REF(3)DOT(0).tsdr->number];
/* new_inport 5 */
  if ((ch_val.inport = make_inport()) == nil) goto ch_depletion;
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).value = ch_val; REF(5).tsdr = & dr_inport;
/* connect 3.1 5 */
  if (REF(5).value.inport->refcount == MAXCOUNTER) goto ch_depletion;
  (*(REF(3)DOT(1).tsdr)->finalize)(REF(3)DOT(1).value,F_DISCARD,sched);
  REF(5).value.inport->refcount++;
  REF(3)DOT(1).value.outport = REF(5).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;
/* discard 0 */
  (*(REF(0).tsdr)->finalize)(REF(0).value,F_DISCARD,sched);
  REF(0).tsdr = & dr_bottom;
c7:
/* discard 6 */
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6).tsdr = & dr_bottom;
/* discard 7 */
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).tsdr = & dr_bottom;
/* discard 8 */
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  REF(8).tsdr = & dr_bottom;
/* discard 9 */
  (*(REF(9).tsdr)->finalize)(REF(9).value,F_DISCARD,sched);
  REF(9).tsdr = & dr_bottom;
/* discard 10 */
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  REF(10).tsdr = & dr_bottom;
/* discard 11 */
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).tsdr = & dr_bottom;
/* discard 12 */
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12).tsdr = & dr_bottom;
  current->ip = 4;
cb16:
/* receive 13 5 */
  if ((ch_returncode = che_receive(DEF(13),DEF(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c17:
/* new_table 8 , 1 */
  if ((ch_returncode = che_new_table(DEF(8),QUAL(1),sched)) != Normal) 
     goto ch_raise_exception;
/* prog_lit 14 , 2 */
  if ((ch_returncode = che_prog_lit(DEF(14),QUAL(2),sched)) != Normal) 
     goto ch_raise_exception;
/* create 9 14 , 3 */
  if ((ch_returncode = che_create(DEF(9),DEF(14),QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
/* discard 14 */
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  REF(14).tsdr = & dr_bottom;
  current->ip = 6;
cb21:
/* call 9 13.0 15 , 4 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(9),
          arguments[1] = DEF(13)DOT(0),
          arguments[2] = DEF(15),
          arguments[2+1] = nil,& arguments[0]),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c22:
/* move 6 15 */
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6) = REF(15);
  REF(15).tsdr = & dr_bottom;
/* copy 16 6 */
  if((ch_returncode = (REF(6).tsdr->copy)(& ch_val, REF(6).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).value = ch_val;
  REF(16).tsdr = datarepmap[REF(6).tsdr->number];
/* insert 8 16 */
  if ((ch_returncode = insertfunc(DEF(8),DEF(16),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* prog_lit 17 , 5 */
  if ((ch_returncode = che_prog_lit(DEF(17),QUAL(5),sched)) != Normal) 
     goto ch_raise_exception;
/* create 10 17 , 6 */
  if ((ch_returncode = che_create(DEF(10),DEF(17),QUAL(6),sched)) != Normal)
     goto ch_raise_exception;
/* discard 17 */
  (*(REF(17).tsdr)->finalize)(REF(17).value,F_DISCARD,sched);
  REF(17).tsdr = & dr_bottom;
  current->ip = 8;
cb28:
/* call 10 13.0 4 18 , 7 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(10),
          arguments[1] = DEF(13)DOT(0),
          arguments[2] = DEF(4),
          arguments[3] = DEF(18),
          arguments[3+1] = nil,& arguments[0]),QUAL(7),sched)) != Normal)
     goto ch_raise_exception;
  return;
c29:
/* move 7 18 */
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7) = REF(18);
  REF(18).tsdr = & dr_bottom;
/* insert 8 7 */
  if ((ch_returncode = insertfunc(DEF(8),DEF(7),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* prog_lit 19 , 8 */
  if ((ch_returncode = che_prog_lit(DEF(19),QUAL(8),sched)) != Normal) 
     goto ch_raise_exception;
/* create 11 19 , 9 */
  if ((ch_returncode = che_create(DEF(11),DEF(19),QUAL(9),sched)) != Normal)
     goto ch_raise_exception;
/* discard 19 */
  (*(REF(19).tsdr)->finalize)(REF(19).value,F_DISCARD,sched);
  REF(19).tsdr = & dr_bottom;
  current->ip = 10;
cb34:
/* call 11 8 6 20 , 10 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(11),
          arguments[1] = DEF(8),
          arguments[2] = DEF(6),
          arguments[3] = DEF(20),
          arguments[3+1] = nil,& arguments[0]),QUAL(10),sched)) != Normal)
     goto ch_raise_exception;
  return;
c35:
/* move 7 20 */
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7) = REF(20);
  REF(20).tsdr = & dr_bottom;
/* prog_lit 21 , 11 */
  if ((ch_returncode = che_prog_lit(DEF(21),QUAL(11),sched)) != Normal) 
     goto ch_raise_exception;
/* create 12 21 , 12 */
  if ((ch_returncode = che_create(DEF(12),DEF(21),QUAL(12),sched)) != Normal)
     goto ch_raise_exception;
/* discard 21 */
  (*(REF(21).tsdr)->finalize)(REF(21).value,F_DISCARD,sched);
  REF(21).tsdr = & dr_bottom;
  current->ip = 12;
cb39:
/* call 12 7 22 , 13 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(12),
          arguments[1] = DEF(7),
          arguments[2] = DEF(22),
          arguments[2+1] = nil,& arguments[0]),QUAL(13),sched)) != Normal)
     goto ch_raise_exception;
  return;
c40:
/* wrap 13.3 22 , 14 */
  if ((ch_returncode = che_wrap(DEF(13)DOT(3),DEF(22),QUAL(14)
    ,sched)) != Normal) goto ch_raise_exception;
/* discard 13.1 */
  (*(REF(13)DOT(1).tsdr)->finalize)(REF(13)DOT(1).value,F_DISCARD,sched);
  REF(13)DOT(1).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 , 7 */
   goto c7;
c44:
/* endblock */
  che_endblock(sched);
c46:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
