#include "chdecl.h"
void CH_makehermes_pcomshell(current, sched, cop)
#define ARGUMENTS 6
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb2;
    case 2: goto c3;
    case 3: goto cb5;
    case 4: goto c6;
    case 5: goto cb20;
    case 6: goto c21;
    case 7: goto cb22;
    case 8: goto c23;
    case 9: goto cb27;
    case 10: goto c28;
    case 11: goto c32;
    case 12: goto c34;
    case 13: goto c37;
    case 14: goto c47;
    case 15: goto c58;  }
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:
/* chs_lit 4 , "pathLoad" */
  if( !chs_lit(DEF(4),"pathLoad") ) goto ch_depletion;
/* chs_lit 5 , "" */
  if( !chs_lit(DEF(5),"") ) goto ch_depletion;
  current->ip = 3;
cb5:
/* call 3.0.2 4 5 6 , 2 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(0)DOT(2),
          arguments[1] = DEF(4),
          arguments[2] = DEF(5),
          arguments[3] = DEF(6),
          arguments[3+1] = nil,& arguments[0]),QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
  return;
c6:
/* unwrap 7 6 , 3 */
  if ((ch_returncode = che_unwrap(DEF(7),DEF(6),QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
/* new_table 8 , 4 */
  if ((ch_returncode = che_new_table(DEF(8),QUAL(4),sched)) != Normal) 
     goto ch_raise_exception;
/* chs_lit 9 , "hermes" */
  if( !chs_lit(DEF(9),"hermes") ) goto ch_depletion;
/* insert 8 9 */
  if ((ch_returncode = insertfunc(DEF(8),DEF(9),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* chs_lit 10 , "pcom" */
  if( !chs_lit(DEF(10),"pcom") ) goto ch_depletion;
/* insert 8 10 */
  if ((ch_returncode = insertfunc(DEF(8),DEF(10),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* copy 11 3.2 */
  if((ch_returncode = (REF(3)DOT(2).tsdr->copy)(& ch_val, REF(3)DOT(2).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).value = ch_val;
  REF(11).tsdr = datarepmap[REF(3)DOT(2).tsdr->number];
/* insert 8 11 */
  if ((ch_returncode = insertfunc(DEF(8),DEF(11),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* copy 12 3.1 */
  if((ch_returncode = (REF(3)DOT(1).tsdr->copy)(& ch_val, REF(3)DOT(1).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12).value = ch_val;
  REF(12).tsdr = datarepmap[REF(3)DOT(1).tsdr->number];
/* copy 13 3.0 */
  if((ch_returncode = (REF(3)DOT(0).tsdr->copy)(& ch_val, REF(3)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(13).tsdr)->finalize)(REF(13).value,F_DISCARD,sched);
  REF(13).value = ch_val;
  REF(13).tsdr = datarepmap[REF(3)DOT(0).tsdr->number];
/* new_inport 14 */
  if ((ch_val.inport = make_inport()) == nil) goto ch_depletion;
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  REF(14).value = ch_val; REF(14).tsdr = & dr_inport;
/* connect 3.3 14 */
  if (REF(14).value.inport->refcount == MAXCOUNTER) goto ch_depletion;
  (*(REF(3)DOT(3).tsdr)->finalize)(REF(3)DOT(3).value,F_DISCARD,sched);
  REF(14).value.inport->refcount++;
  REF(3)DOT(3).value.outport = REF(14).value.inport;
  REF(3)DOT(3).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;
  current->ip = 5;
cb20:
/* receive 15 14 */
  if ((ch_returncode = che_receive(DEF(15),DEF(14),sched)) != Normal)
     goto ch_raise_exception;
  return;
c21:
/* chs_lit 16 , "pcom" */
  if( !chs_lit(DEF(16),"pcom") ) goto ch_depletion;
  current->ip = 7;
cb22:
/* call 7 16 17 , 5 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(7),
          arguments[1] = DEF(16),
          arguments[2] = DEF(17),
          arguments[2+1] = nil,& arguments[0]),QUAL(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c23:
/* create 18 17 , 6 */
  if ((ch_returncode = che_create(DEF(18),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;
/* move 19 18 */
  (*(REF(19).tsdr)->finalize)(REF(19).value,F_DISCARD,sched);
  REF(19) = REF(18);
  REF(18).tsdr = & dr_bottom;
/* block , 7 */
  if((ch_returncode = che_block(QUAL(7),sched)) != Normal)
     goto ch_raise_exception;
  current->ip = 9;
cb27:
/* call 19 8 12 13 , 8 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(19),
          arguments[1] = DEF(8),
          arguments[2] = DEF(12),
          arguments[3] = DEF(13),
          arguments[3+1] = nil,& arguments[0]),QUAL(8),sched)) != Normal)
     goto ch_raise_exception;
  return;
c28:
/* boolean 15.0 , TRUE */
  REF(15)DOT(0).value.boolean = TRUE;
  REF(15)DOT(0).tsdr = & dr_boolean;
/* endblock */
  che_endblock(sched);
/* branch , 34 */
   goto c34;
c32:
/* boolean 15.0 , FALSE */
  REF(15)DOT(0).value.boolean = FALSE;
  REF(15)DOT(0).tsdr = & dr_boolean;
c34:
/* return 15 */
  if (ch_caller = do_return(REF(15).value)) {
    if (ch_caller->type < CProcess) ch_caller->ip++;
      sched->wakeup_proc(sched, ch_caller);}
  else rem_return(REF(15).value);
  REF(15).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
/* branch , 47 */
   goto c47;
c37:
/* discard 3 */
  (*(REF(3).tsdr)->finalize)(REF(3).value,F_DISCARD,sched);
  REF(3).tsdr = & dr_bottom;
/* discard 15 */
  (*(REF(15).tsdr)->finalize)(REF(15).value,F_DISCARD,sched);
  REF(15).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 13 */
  (*(REF(13).tsdr)->finalize)(REF(13).value,F_DISCARD,sched);
  REF(13).tsdr = & dr_bottom;
/* discard 12 */
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12).tsdr = & dr_bottom;
/* discard 14 */
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  REF(14).tsdr = & dr_bottom;
/* discard 4 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).tsdr = & dr_bottom;
/* discard 5 */
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).tsdr = & dr_bottom;
/* discard 16 */
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).tsdr = & dr_bottom;
c47:
/* discard 7 */
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).tsdr = & dr_bottom;
/* discard 19 */
  (*(REF(19).tsdr)->finalize)(REF(19).value,F_DISCARD,sched);
  REF(19).tsdr = & dr_bottom;
/* discard 8 */
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  REF(8).tsdr = & dr_bottom;
/* discard 13 */
  (*(REF(13).tsdr)->finalize)(REF(13).value,F_DISCARD,sched);
  REF(13).tsdr = & dr_bottom;
/* discard 12 */
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12).tsdr = & dr_bottom;
/* discard 14 */
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  REF(14).tsdr = & dr_bottom;
/* discard 4 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).tsdr = & dr_bottom;
/* discard 5 */
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).tsdr = & dr_bottom;
/* discard 16 */
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c58:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
