#include "chdecl.h"
void CH_unixcmd(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 cb4;
    case 4: goto c5;
    case 8: goto c7;
    case 5: goto c7;
    case 6: goto cb11;
    case 7: goto c12;
    case 9: goto c14;
    case 10: goto cb16;
    case 11: goto c17;
    case 12: goto c18;
    case 13: goto c21;
    case 14: goto c25;
    case 15: goto c28;  }
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:
/* block , 1 */
  if((ch_returncode = che_block(QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
/* enum_lit 4 , 0 */
  REF(4).value.enumeration = 0;
  REF(4).tsdr = & dr_enumeration;
  current->ip = 3;
cb4:
/* call 3.1 3.0 4 5 , 2 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(1),
          arguments[1] = DEF(3)DOT(0),
          arguments[2] = DEF(4),
          arguments[3] = DEF(5),
          arguments[3+1] = nil,& arguments[0]),QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
  return;
c5:
/* noop */
  
/* block , 3 */
  if((ch_returncode = che_block(QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
c13:
c7:
/* discard 6 */
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6).tsdr = & dr_bottom;
/* ilit 7 , 80 */
  REF(7).value.integer = 80;
  REF(7).tsdr = & dr_integer;
  current->ip = 6;
cb11:
/* call 5.2 7 6 , 4 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(5)DOT(2),
          arguments[1] = DEF(7),
          arguments[2] = DEF(6),
          arguments[2+1] = nil,& arguments[0]),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c12:
/* call 3.2 6 , 5 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2),
          arguments[1] = DEF(6),
          arguments[1+1] = nil,& arguments[0]),QUAL(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c14:
/* endblock */
  che_endblock(sched);
/* branch , 18 */
   goto c18;
c16:
  current->ip = 10;
cb16:
/* call 5.11 , 6 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(5)DOT(11),
          arguments[0+1] = nil,& arguments[0]),QUAL(6),sched)) != Normal)
     goto ch_raise_exception;
  return;
c17:
/* 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;
c18:
/* discard 3 */
  (*(REF(3).tsdr)->finalize)(REF(3).value,F_DISCARD,sched);
  REF(3).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
/* branch , 25 */
   goto c25;
c21:
/* discard 5 */
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).tsdr = & dr_bottom;
/* discard 6 */
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6).tsdr = & dr_bottom;
/* return_exception 3 , 7 */
  if (ch_caller = do_return(REF(3).value)) {
    raise_user(QUAL(7),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(3),QUAL(7));
  REF(3).tsdr = & dr_bottom;
c25:
/* discard 5 */
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c28:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
