#include "chdecl.h"
void CH_window_closewin(current, sched, cop)
#define ARGUMENTS 5
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb1;
    case 2: goto c2;
    case 3: goto cb10;
    case 4: goto c11;
    case 5: goto cb12;
    case 6: goto c13;
    case 7: goto cb14;
    case 8: goto c15;
    case 9: goto c18;
    case 10: goto cb21;
    case 11: goto c22;
    case 12: goto c25;
    case 13: goto c29;
    case 14: goto c33;
    case 15: goto c35;  }
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:
/* move 4 3.3 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4) = REF(3)DOT(3);
  REF(3)DOT(3).tsdr = & dr_bottom;
/* move 5 3.4 */
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5) = REF(3)DOT(4);
  REF(3)DOT(4).tsdr = & dr_bottom;
/* 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.5 6 */
  if (REF(6).value.inport->refcount == MAXCOUNTER) goto ch_depletion;
  (*(REF(3)DOT(5).tsdr)->finalize)(REF(3)DOT(5).value,F_DISCARD,sched);
  REF(6).value.inport->refcount++;
  REF(3)DOT(5).value.outport = REF(6).value.inport;
  REF(3)DOT(5).tsdr = & dr_outport;
/* move 7 3.0 */
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7) = REF(3)DOT(0);
  REF(3)DOT(0).tsdr = & dr_bottom;
/* move 8 3.1 */
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  REF(8) = REF(3)DOT(1);
  REF(3)DOT(1).tsdr = & dr_bottom;
/* move 9 3.2 */
  (*(REF(9).tsdr)->finalize)(REF(9).value,F_DISCARD,sched);
  REF(9) = REF(3)DOT(2);
  REF(3)DOT(2).tsdr = & dr_bottom;
/* 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 = 3;
cb10:
/* receive 10 6 */
  if ((ch_returncode = che_receive(DEF(10),DEF(6),sched)) != Normal)
     goto ch_raise_exception;
  return;
c11:
/* discard 6 */
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6).tsdr = & dr_bottom;
  current->ip = 5;
cb12:
/* call 7 , 1 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(7),
          arguments[0+1] = nil,& arguments[0]),QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
  return;
c13:
/* block , 2 */
  if((ch_returncode = che_block(QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
  current->ip = 7;
cb14:
/* call 8 11 12 , 3 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(8),
          arguments[1] = DEF(11),
          arguments[2] = DEF(12),
          arguments[2+1] = nil,& arguments[0]),QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
  return;
c15:
/* endblock */
  che_endblock(sched);
/* branch , 18 */
   goto c18;
c18:
/* discard 11 */
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).tsdr = & dr_bottom;
/* block , 4 */
  if((ch_returncode = che_block(QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
/* chs_lit 13 , "Die!" */
  if( !chs_lit(DEF(13),"Die!") ) goto ch_depletion;
  current->ip = 10;
cb21:
/* call 9 13 14 , 5 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(9),
          arguments[1] = DEF(13),
          arguments[2] = DEF(14),
          arguments[2+1] = nil,& arguments[0]),QUAL(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c22:
/* endblock */
  che_endblock(sched);
/* branch , 25 */
   goto c25;
c25:
/* block , 6 */
  if((ch_returncode = che_block(QUAL(6),sched)) != Normal)
     goto ch_raise_exception;
/* send 4 10 */
  if ((ch_returncode = che_send(DEF(4),DEF(10),sched)) != Normal)
     goto ch_raise_exception;
/* endblock */
  che_endblock(sched);
c29:
/* block , 7 */
  if((ch_returncode = che_block(QUAL(7),sched)) != Normal)
     goto ch_raise_exception;
/* send 5 10 */
  if ((ch_returncode = che_send(DEF(5),DEF(10),sched)) != Normal)
     goto ch_raise_exception;
/* endblock */
  che_endblock(sched);
c33:
/* endblock */
  che_endblock(sched);
c35:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
