#include "chdecl.h"
void CH_startnet(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 cb8;
    case 4: goto c9;
    case 5: goto cb11;
    case 6: goto c12;
    case 7: goto cb17;
    case 8: goto c18;
    case 9: goto c21;
    case 10: goto c23;
    case 11: goto cb24;
    case 12: goto c25;
    case 13: 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:
/* prog_lit 4 , 1 */
  if ((ch_returncode = che_prog_lit(DEF(4),QUAL(1),sched)) != Normal) 
     goto ch_raise_exception;
/* procedure 5 4 , 2 */
  if ((ch_returncode = che_procedure(DEF(5),DEF(4),QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
/* discard 4 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).tsdr = & dr_bottom;
/* move 6 5 */
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6) = REF(5);
  REF(5).tsdr = & dr_bottom;
/* chs_lit 7 , "CLoader" */
  if( !chs_lit(DEF(7),"CLoader") ) goto ch_depletion;
/* chs_lit 8 , "" */
  if( !chs_lit(DEF(8),"") ) goto ch_depletion;
  current->ip = 3;
cb8:
/* call 3.2.2 7 8 9 , 3 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(2),
          arguments[1] = DEF(7),
          arguments[2] = DEF(8),
          arguments[3] = DEF(9),
          arguments[3+1] = nil,& arguments[0]),QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
  return;
c9:
/* unwrap 10 9 , 4 */
  if ((ch_returncode = che_unwrap(DEF(10),DEF(9),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
/* chs_lit 11 , "start network" */
  if( !chs_lit(DEF(11),"start network") ) goto ch_depletion;
  current->ip = 5;
cb11:
/* call 10 11 12 , 5 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(10),
          arguments[1] = DEF(11),
          arguments[2] = DEF(12),
          arguments[2+1] = nil,& arguments[0]),QUAL(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c12:
/* unwrap 13 12 , 6 */
  if ((ch_returncode = che_unwrap(DEF(13),DEF(12),QUAL(6),sched)) != Normal)
     goto ch_raise_exception;
/* block , 7 */
  if((ch_returncode = che_block(QUAL(7),sched)) != Normal)
     goto ch_raise_exception;
/* lookup_at 14 3.0 =(2) */
  if (2 >= (ch_t = REF(3)DOT(0).value.table)->size) goto ch_notfound;
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(14).value,2);
  REF(14).tsdr = qdatarepmap[ch_t->tsdr->number];
/* copy 15 14 */
  if((ch_returncode = (REF(14).tsdr->copy)(& 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 = datarepmap[REF(14).tsdr->number];
  current->ip = 7;
cb17:
/* call 6 15 16 , 8 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(6),
          arguments[1] = DEF(15),
          arguments[2] = DEF(16),
          arguments[2+1] = nil,& arguments[0]),QUAL(8),sched)) != Normal)
     goto ch_raise_exception;
  return;
c18:
/* move 17 16 */
  REF(17) = REF(16);
  REF(16).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
/* branch , 23 */
   goto c23;
c21:
/* ilit 17 , 1 */
  REF(17).value.integer = 1;
  REF(17).tsdr = & dr_integer;
c23:
/* discard 15 */
  (*(REF(15).tsdr)->finalize)(REF(15).value,F_DISCARD,sched);
  REF(15).tsdr = & dr_bottom;
  current->ip = 11;
cb24:
/* call 13 17 , 9 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(13),
          arguments[1] = DEF(17),
          arguments[1+1] = nil,& arguments[0]),QUAL(9),sched)) != Normal)
     goto ch_raise_exception;
  return;
c25:
/* 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;
/* endblock */
  che_endblock(sched);
c28:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
