#include "chdecl.h"
void CH_plumber_acpipe(current, sched, cop)
#define ARGUMENTS 10
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb2;
    case 2: goto c3;
    case 3: goto cb14;
    case 5: goto cb16;
    case 6: goto c17;
    case 7: goto cb20;
    case 8: goto c21;
    case 4: goto c24;
    case 9: goto c24;
    case 10: goto c25;
    case 11: goto cb33;
    case 12: goto c34;
    case 13: goto cb37;
    case 14: goto c38;
    case 17: goto c52;
    case 15: goto c52;
    case 16: goto cb58;
    case 18: goto cb60;
    case 19: goto c61;
    case 20: goto cb72;
    case 21: goto c73;
    case 22: goto cb75;
    case 23: goto c76;
    case 24: goto cb87;
    case 25: goto c88;
    case 26: goto c91;
    case 27: goto c93;
    case 28: goto c100;  }
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:
/* 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;
/* 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;
/* new_inport 6 */
  if ((ch_val.inport = make_inport()) == nil) goto ch_depletion;
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6).value = ch_val; REF(6).tsdr = & dr_inport;
/* connect 3.2 6 */
  if (REF(6).value.inport->refcount == MAXCOUNTER) goto ch_depletion;
  (*(REF(3)DOT(2).tsdr)->finalize)(REF(3)DOT(2).value,F_DISCARD,sched);
  REF(6).value.inport->refcount++;
  REF(3)DOT(2).value.outport = REF(6).value.inport;
  REF(3)DOT(2).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;
/* boolean 7 , FALSE */
  REF(7).value.boolean = FALSE;
  REF(7).tsdr = & dr_boolean;
/* boolean 8 , FALSE */
  REF(8).value.boolean = FALSE;
  REF(8).tsdr = & dr_boolean;
  current->ip = 3;
cb14:
/* select 6 * 5 * , 2 */
  if ((ch_returncode = che_select((
          arguments[0] = DEF(6),
          arguments[1] = NO_OBJECT,
          arguments[2] = DEF(5),
          arguments[3] = NO_OBJECT,
          arguments[3+1] = nil,& arguments[0]),QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
  if (current->ip == 3) return; else COMPUTE_TARGET;
c16:
  current->ip = 5;
cb16:
/* receive 9 6 */
  if ((ch_returncode = che_receive(DEF(9),DEF(6),sched)) != Normal)
     goto ch_raise_exception;
  return;
c17:
/* enum_lit 10 , 1 */
  REF(10).value.enumeration = 1;
  REF(10).tsdr = & dr_enumeration;
/* branch , 25 */
   goto c25;
c20:
  current->ip = 7;
cb20:
/* receive 9 5 */
  if ((ch_returncode = che_receive(DEF(9),DEF(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c21:
/* enum_lit 10 , 0 */
  REF(10).value.enumeration = 0;
  REF(10).tsdr = & dr_enumeration;
/* branch , 25 */
   goto c25;
c15:
c24:
/* exit , 3 */
  ch_e = handler_type__exit; ch_val = QUAL(3); goto ch_exception;
c25:
/* copy 11 9.2 */
  if((ch_returncode = cp_table(& ch_val, REF(9)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 = & dr_table;
/* chs_lit 12 , "make" */
  if( !chs_lit(DEF(12),"make") ) goto ch_depletion;
/* concat 13 12 11 */
  if ((ch_returncode = che_concat(DEF(13),DEF(12),DEF(11),sched)) != Normal)
     goto ch_raise_exception;
/* discard 12 */
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12).tsdr = & dr_bottom;
/* chs_lit 14 , "pipe" */
  if( !chs_lit(DEF(14),"pipe") ) goto ch_depletion;
/* concat 15 13 14 */
  if ((ch_returncode = che_concat(DEF(15),DEF(13),DEF(14),sched)) != Normal)
     goto ch_raise_exception;
/* discard 13 */
  (*(REF(13).tsdr)->finalize)(REF(13).value,F_DISCARD,sched);
  REF(13).tsdr = & dr_bottom;
/* discard 14 */
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  REF(14).tsdr = & dr_bottom;
  current->ip = 11;
cb33:
/* call 4 15 16 , 4 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(4),
          arguments[1] = DEF(15),
          arguments[2] = DEF(16),
          arguments[2+1] = nil,& arguments[0]),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c34:
/* create 17 16 , 5 */
  if ((ch_returncode = che_create(DEF(17),DEF(16),QUAL(5),sched)) != Normal)
     goto ch_raise_exception;
/* discard 16 */
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).tsdr = & dr_bottom;
/* move 18 17 */
  (*(REF(18).tsdr)->finalize)(REF(18).value,F_DISCARD,sched);
  REF(18) = REF(17);
  REF(17).tsdr = & dr_bottom;
  current->ip = 13;
cb37:
/* call 18 19 20 , 6 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(18),
          arguments[1] = DEF(19),
          arguments[2] = DEF(20),
          arguments[2+1] = nil,& arguments[0]),QUAL(6),sched)) != Normal)
     goto ch_raise_exception;
  return;
c38:
/* noop */
  
/* notequal . 10 =(0) , 46 */
  if ( REF(10).value.enumeration != 0 ) goto c46;
/* move 9.3 19 */
  (*(REF(9)DOT(3).tsdr)->finalize)(REF(9)DOT(3).value,F_DISCARD,sched);
  REF(9)DOT(3) = REF(19);
  REF(19).tsdr = & dr_bottom;
/* boolean 7 , TRUE */
  REF(7).value.boolean = TRUE;
  REF(7).tsdr = & dr_boolean;
/* wrap 19 21 , 7 */
  if ((ch_returncode = che_wrap(DEF(19),DEF(21),QUAL(7),sched)) != Normal)
     goto ch_raise_exception;
/* branch , 50 */
   goto c50;
c46:
/* move 9.3 20 */
  (*(REF(9)DOT(3).tsdr)->finalize)(REF(9)DOT(3).value,F_DISCARD,sched);
  REF(9)DOT(3) = REF(20);
  REF(20).tsdr = & dr_bottom;
/* boolean 8 , TRUE */
  REF(8).value.boolean = TRUE;
  REF(8).tsdr = & dr_boolean;
/* wrap 20 21 , 7 */
  if ((ch_returncode = che_wrap(DEF(20),DEF(21),QUAL(7),sched)) != Normal)
     goto ch_raise_exception;
c50:
/* discard 9.1 */
  (*(REF(9)DOT(1).tsdr)->finalize)(REF(9)DOT(1).value,F_DISCARD,sched);
  REF(9)DOT(1).tsdr = & dr_bottom;
/* return 9 */
  if (ch_caller = do_return(REF(9).value)) {
    if (ch_caller->type < CProcess) ch_caller->ip++;
      sched->wakeup_proc(sched, ch_caller);}
  else rem_return(REF(9).value);
  REF(9).tsdr = & dr_bottom;
c59:
c52:
/* noop */
  
/* not 22 8 */
  REF(22).value.boolean = !REF(8).value.boolean;
  REF(22).tsdr = & dr_boolean;
/* and 23 8 7 */
  REF(23).value.boolean = REF(8).value.boolean&REF(7).value.boolean;
  REF(23).tsdr = & dr_boolean;
/* not 24 7 */
  REF(24).value.boolean = !REF(7).value.boolean;
  REF(24).tsdr = & dr_boolean;
/* and 25 7 8 */
  REF(25).value.boolean = REF(7).value.boolean&REF(8).value.boolean;
  REF(25).tsdr = & dr_boolean;
  current->ip = 16;
cb58:
/* select 6 22 6 23 5 24 5 25 , 8 */
  if ((ch_returncode = che_select((
          arguments[0] = DEF(6),
          arguments[1] = DEF(22),
          arguments[2] = DEF(6),
          arguments[3] = DEF(23),
          arguments[4] = DEF(5),
          arguments[5] = DEF(24),
          arguments[6] = DEF(5),
          arguments[7] = DEF(25),
          arguments[7+1] = nil,& arguments[0]),QUAL(8),sched)) != Normal)
     goto ch_raise_exception;
  if (current->ip == 16) return; else COMPUTE_TARGET;
c60:
  current->ip = 18;
cb60:
/* receive 9 6 */
  if ((ch_returncode = che_receive(DEF(9),DEF(6),sched)) != Normal)
     goto ch_raise_exception;
  return;
c61:
/* notequal . 9.2 11 , 70 */
  if ( !eq_table(REF(9)DOT(2).value,REF(11).value) ) goto c70;
/* move 9.3 20 */
  (*(REF(9)DOT(3).tsdr)->finalize)(REF(9)DOT(3).value,F_DISCARD,sched);
  REF(9)DOT(3) = REF(20);
  REF(20).tsdr = & dr_bottom;
/* wrap 20 21 , 7 */
  if ((ch_returncode = che_wrap(DEF(20),DEF(21),QUAL(7),sched)) != Normal)
     goto ch_raise_exception;
/* discard 9.1 */
  (*(REF(9)DOT(1).tsdr)->finalize)(REF(9)DOT(1).value,F_DISCARD,sched);
  REF(9)DOT(1).tsdr = & dr_bottom;
/* return 9 */
  if (ch_caller = do_return(REF(9).value)) {
    if (ch_caller->type < CProcess) ch_caller->ip++;
      sched->wakeup_proc(sched, ch_caller);}
  else rem_return(REF(9).value);
  REF(9).tsdr = & dr_bottom;
/* boolean 8 , TRUE */
  REF(8).value.boolean = TRUE;
  REF(8).tsdr = & dr_boolean;
/* branch , 52 */
   goto c52;
c70:
/* return_exception 9 , 9 */
  if (ch_caller = do_return(REF(9).value)) {
    raise_user(QUAL(9),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(9),QUAL(9));
  REF(9).tsdr = & dr_bottom;
/* branch , 52 */
   goto c52;
c72:
  current->ip = 20;
cb72:
/* receive 9 6 */
  if ((ch_returncode = che_receive(DEF(9),DEF(6),sched)) != Normal)
     goto ch_raise_exception;
  return;
c73:
/* return_exception 9 , 9 */
  if (ch_caller = do_return(REF(9).value)) {
    raise_user(QUAL(9),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(9),QUAL(9));
  REF(9).tsdr = & dr_bottom;
/* branch , 52 */
   goto c52;
c75:
  current->ip = 22;
cb75:
/* receive 9 5 */
  if ((ch_returncode = che_receive(DEF(9),DEF(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c76:
/* notequal . 9.2 11 , 85 */
  if ( !eq_table(REF(9)DOT(2).value,REF(11).value) ) goto c85;
/* move 9.3 19 */
  (*(REF(9)DOT(3).tsdr)->finalize)(REF(9)DOT(3).value,F_DISCARD,sched);
  REF(9)DOT(3) = REF(19);
  REF(19).tsdr = & dr_bottom;
/* wrap 19 21 , 7 */
  if ((ch_returncode = che_wrap(DEF(19),DEF(21),QUAL(7),sched)) != Normal)
     goto ch_raise_exception;
/* discard 9.1 */
  (*(REF(9)DOT(1).tsdr)->finalize)(REF(9)DOT(1).value,F_DISCARD,sched);
  REF(9)DOT(1).tsdr = & dr_bottom;
/* return 9 */
  if (ch_caller = do_return(REF(9).value)) {
    if (ch_caller->type < CProcess) ch_caller->ip++;
      sched->wakeup_proc(sched, ch_caller);}
  else rem_return(REF(9).value);
  REF(9).tsdr = & dr_bottom;
/* boolean 7 , TRUE */
  REF(7).value.boolean = TRUE;
  REF(7).tsdr = & dr_boolean;
/* branch , 52 */
   goto c52;
c85:
/* return_exception 9 , 9 */
  if (ch_caller = do_return(REF(9).value)) {
    raise_user(QUAL(9),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(9),QUAL(9));
  REF(9).tsdr = & dr_bottom;
/* branch , 52 */
   goto c52;
c87:
  current->ip = 24;
cb87:
/* receive 9 5 */
  if ((ch_returncode = che_receive(DEF(9),DEF(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c88:
/* return_exception 9 , 9 */
  if (ch_caller = do_return(REF(9).value)) {
    raise_user(QUAL(9),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(9),QUAL(9));
  REF(9).tsdr = & dr_bottom;
/* branch , 52 */
   goto c52;
c91:
/* endblock */
  che_endblock(sched);
c93:
/* discard 18 */
  (*(REF(18).tsdr)->finalize)(REF(18).value,F_DISCARD,sched);
  REF(18).tsdr = & dr_bottom;
/* discard 11 */
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).tsdr = & dr_bottom;
/* discard 19 */
  (*(REF(19).tsdr)->finalize)(REF(19).value,F_DISCARD,sched);
  REF(19).tsdr = & dr_bottom;
/* discard 20 */
  (*(REF(20).tsdr)->finalize)(REF(20).value,F_DISCARD,sched);
  REF(20).tsdr = & dr_bottom;
/* discard 15 */
  (*(REF(15).tsdr)->finalize)(REF(15).value,F_DISCARD,sched);
  REF(15).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c100:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
