#include "chdecl.h"
void CH_typestate_checkguardc(current, sched, cop)
#define ARGUMENTS 11
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb1;
    case 2: goto c2;
    case 3: goto cb3;
    case 4: goto c4;
    case 5: goto cb13;
    case 6: goto c14;
    case 7: goto c17;
    case 8: goto c30;
    case 9: goto c34;  }
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;
  current->ip = 3;
cb3:
/* call 3.0.0 3.0 3.1 3.2 3.3 3.6 3.7 3.8 , 2 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(0)DOT(0),
          arguments[1] = DEF(3)DOT(0),
          arguments[2] = DEF(3)DOT(1),
          arguments[3] = DEF(3)DOT(2),
          arguments[4] = DEF(3)DOT(3),
          arguments[5] = DEF(3)DOT(6),
          arguments[6] = DEF(3)DOT(7),
          arguments[7] = DEF(3)DOT(8),
          arguments[7+1] = nil,& arguments[0]),QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
  return;
c4:
/* new_table 4 , 3 */
  if ((ch_returncode = che_new_table(DEF(4),QUAL(3),sched)) != Normal) 
     goto ch_raise_exception;
/* new_record 5 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).value = ch_val; REF(5).tsdr = & dr_record;
/* unite 5.0 6 , 0 */
  if ((ch_returncode = che_unite(DEF(5)DOT(0),DEF(6),sched,0)) != Normal)
     goto ch_raise_exception;
/* new_table 5.1 , 4 */
  if ((ch_returncode = che_new_table(DEF(5)DOT(1),QUAL(4),sched)) != Normal) 
     goto ch_raise_exception;
/* copy 7 3.5 */
  if((ch_returncode = (REF(3)DOT(5).tsdr->copy)(& ch_val, REF(3)DOT(5).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).value = ch_val;
  REF(7).tsdr = datarepmap[REF(3)DOT(5).tsdr->number];
/* insert 5.1 7 */
  if ((ch_returncode = insertfunc(DEF(5)DOT(1),DEF(7),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* insert 4 5 */
  if ((ch_returncode = insertfunc(DEF(4),DEF(5),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* new_table 8 , 3 */
  if ((ch_returncode = che_new_table(DEF(8),QUAL(3),sched)) != Normal) 
     goto ch_raise_exception;
  current->ip = 5;
cb13:
/* call 3.0.1 3.0 3.1.0 3.2 3.4 3.8 4 8 3.7 , 5 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(0)DOT(1),
          arguments[1] = DEF(3)DOT(0),
          arguments[2] = DEF(3)DOT(1)DOT(0),
          arguments[3] = DEF(3)DOT(2),
          arguments[4] = DEF(3)DOT(4),
          arguments[5] = DEF(3)DOT(8),
          arguments[6] = DEF(4),
          arguments[7] = DEF(8),
          arguments[8] = DEF(3)DOT(7),
          arguments[8+1] = nil,& arguments[0]),QUAL(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c14:
/* 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);
/* branch , 30 */
   goto c30;
c17:
/* new_record 9 , 3 */
  if ((ch_val.record = new_record(3)) == nil) goto ch_depletion;
  (*(REF(9).tsdr)->finalize)(REF(9).value,F_DISCARD,sched);
  REF(9).value = ch_val; REF(9).tsdr = & dr_record;
/* copy 10 3.4 */
  if((ch_returncode = (REF(3)DOT(4).tsdr->copy)(& ch_val, REF(3)DOT(4).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  REF(10).value = ch_val;
  REF(10).tsdr = datarepmap[REF(3)DOT(4).tsdr->number];
/* unite 9.0 10 , 0 */
  if ((ch_returncode = che_unite(DEF(9)DOT(0),DEF(10),sched,0)) != Normal)
     goto ch_raise_exception;
/* ordenum_lit 9.1 , 12 */
  REF(9)DOT(1).value.ord_enum = 12;
  REF(9)DOT(1).tsdr = & dr_ord_enumeration;
/* new_table 9.2 , 4 */
  if ((ch_returncode = che_new_table(DEF(9)DOT(2),QUAL(4),sched)) != Normal) 
     goto ch_raise_exception;
/* chs_lit 11 , "IF/WHILE/WHERE guard expression does not terminate" */
  if( !chs_lit(DEF(11),"IF/WHILE/WHERE guard expression does not terminate") )
     goto ch_depletion;
/* unite 12 11 , 3 */
  if ((ch_returncode = che_unite(DEF(12),DEF(11),sched,3)) != Normal)
     goto ch_raise_exception;
/* insert 9.2 12 */
  if ((ch_returncode = insertfunc(DEF(9)DOT(2),DEF(12),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* insert 3.8.11 9 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(8)DOT(11),DEF(9)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
/* return_exception 3 , 6 */
  if (ch_caller = do_return(REF(3).value)) {
    raise_user(QUAL(6),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(3),QUAL(6));
  REF(3).tsdr = & dr_bottom;
c30:
/* discard 4 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).tsdr = & dr_bottom;
/* discard 8 */
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  REF(8).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c34:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
