#include "chdecl.h"
void CH_codegen_cgwhile(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 cb21;
    case 4: goto c22;
    case 5: goto cb27;
    case 6: goto c28;
    case 7: goto cb39;
    case 8: goto c40;
    case 9: goto c54;  }
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:
/* reveal 3.0.3 , 16 */
  if (16 != REF(3)DOT(0)DOT(3).value.variant->info.variant_case)
     goto ch_case_error;
/* unique 4 */
  if ((ch_returncode = che_unique(DEF(4),sched)) != Normal)
     goto ch_raise_exception;
/* unique 5 */
  if ((ch_returncode = che_unique(DEF(5),sched)) != Normal)
     goto ch_raise_exception;
/* unique 6 */
  if ((ch_returncode = che_unique(DEF(6),sched)) != Normal)
     goto ch_raise_exception;
/* copy 7 4 */
  if((ch_returncode = cp_nominal(& ch_val, REF(4).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).value = ch_val;
  REF(7).tsdr = & dr_nominal;
/* unite 3.2.4.3.2 7 , 0 */
  if ((ch_returncode = che_unite(DEF(3)DOT(2)DOT(4)DOT(3)DOT(2),DEF(7),sched,0
    )) != Normal) goto ch_raise_exception;
/* copy 8 3.2.4.3.0 */
  if((ch_returncode = cp_nominal(& ch_val, 
    REF(3)DOT(2)DOT(4)DOT(3)DOT(0).value)) != Normal) goto ch_raise_exception;
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  REF(8).value = ch_val;
  REF(8).tsdr = & dr_nominal;
/* insert 3.2.4.2.2 8 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(2)DOT(2),DEF(8)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
/* insert 3.2.4.2.0 3.2.4.3 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(2)DOT(0),
    DEF(3)DOT(2)DOT(4)DOT(3),FALSE,0)) != Normal) goto ch_raise_exception;
/* new_record 3.2.4.3 , 3 */
  if ((ch_val.record = new_record(3)) == nil) goto ch_depletion;
  (*(REF(3)DOT(2)DOT(4)DOT(3).tsdr)->finalize)(REF(3)DOT(2)DOT(4)DOT(3).value
    ,F_DISCARD,sched);
  REF(3)DOT(2)DOT(4)DOT(3).value = ch_val; REF(3)DOT(2)DOT(4)DOT(3).tsdr
     = & dr_record;
/* copy 3.2.4.3.0 4 */
  if((ch_returncode = cp_nominal(& ch_val, REF(4).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(3)DOT(2)DOT(4)DOT(3)DOT(0).tsdr)->finalize)(
    REF(3)DOT(2)DOT(4)DOT(3)DOT(0).value,F_DISCARD,sched);
  REF(3)DOT(2)DOT(4)DOT(3)DOT(0).value = ch_val;
  REF(3)DOT(2)DOT(4)DOT(3)DOT(0).tsdr = & dr_nominal;
/* new_table 3.2.4.3.1 , 1 */
  if ((ch_returncode = che_new_table(DEF(3)DOT(2)DOT(4)DOT(3)DOT(1),QUAL(1)
    ,sched)) != Normal)  goto ch_raise_exception;
/* unite 3.2.4.3.2 9 , 6 */
  if ((ch_returncode = che_unite(DEF(3)DOT(2)DOT(4)DOT(3)DOT(2),DEF(9),sched,6
    )) != Normal) goto ch_raise_exception;
  current->ip = 3;
cb21:
/* call 3.2.3.2 3.0.3.0.0 3.2 , 2 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(3)DOT(2),
          arguments[1] = DEF(3)DOT(0)DOT(3)DOT(0)DOT(0),
          arguments[2] = DEF(3)DOT(2),
          arguments[2+1] = nil,& arguments[0]),QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
  return;
c22:
/* new_record 10 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  REF(10).value = ch_val; REF(10).tsdr = & dr_record;
/* copy 10.0 5 */
  if((ch_returncode = cp_nominal(& ch_val, REF(5).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(10)DOT(0).tsdr)->finalize)(REF(10)DOT(0).value,F_DISCARD,sched);
  REF(10)DOT(0).value = ch_val;
  REF(10)DOT(0).tsdr = & dr_nominal;
/* copy 10.1 6 */
  if((ch_returncode = cp_nominal(& ch_val, REF(6).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(10)DOT(1).tsdr)->finalize)(REF(10)DOT(1).value,F_DISCARD,sched);
  REF(10)DOT(1).value = ch_val;
  REF(10)DOT(1).tsdr = & dr_nominal;
/* unite 3.2.4.3.2 10 , 1 */
  if ((ch_returncode = che_unite(DEF(3)DOT(2)DOT(4)DOT(3)DOT(2),DEF(10),sched,
    1)) != Normal) goto ch_raise_exception;
/* copy 11 3.2.5.2 */
  if((ch_returncode = (REF(3)DOT(2)DOT(5)DOT(2).tsdr->copy)(& ch_val, 
    REF(3)DOT(2)DOT(5)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 = datarepmap[REF(3)DOT(2)DOT(5)DOT(2).tsdr->number];
  current->ip = 5;
cb27:
/* call 3.2.4.4 3.0.3.0.1 12 , 3 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(4)DOT(4),
          arguments[1] = DEF(3)DOT(0)DOT(3)DOT(0)DOT(1),
          arguments[2] = DEF(12),
          arguments[2+1] = nil,& arguments[0]),QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
  return;
c28:
/* insert 11.1 12 */
  if ((ch_returncode = insertfunc(DEF(11)DOT(1),DEF(12),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* insert 3.2.4.3.1 11 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(3)DOT(1),DEF(11)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
/* copy 13 3.2.4.3.0 */
  if((ch_returncode = cp_nominal(& ch_val, 
    REF(3)DOT(2)DOT(4)DOT(3)DOT(0).value)) != Normal) goto ch_raise_exception;
  (*(REF(13).tsdr)->finalize)(REF(13).value,F_DISCARD,sched);
  REF(13).value = ch_val;
  REF(13).tsdr = & dr_nominal;
/* insert 3.2.4.2.2 13 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(2)DOT(2),DEF(13)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
/* insert 3.2.4.2.0 3.2.4.3 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(2)DOT(0),
    DEF(3)DOT(2)DOT(4)DOT(3),FALSE,0)) != Normal) goto ch_raise_exception;
/* new_record 3.2.4.3 , 3 */
  if ((ch_val.record = new_record(3)) == nil) goto ch_depletion;
  (*(REF(3)DOT(2)DOT(4)DOT(3).tsdr)->finalize)(REF(3)DOT(2)DOT(4)DOT(3).value
    ,F_DISCARD,sched);
  REF(3)DOT(2)DOT(4)DOT(3).value = ch_val; REF(3)DOT(2)DOT(4)DOT(3).tsdr
     = & dr_record;
/* move 3.2.4.3.0 5 */
  (*(REF(3)DOT(2)DOT(4)DOT(3)DOT(0).tsdr)->finalize)(
    REF(3)DOT(2)DOT(4)DOT(3)DOT(0).value,F_DISCARD,sched);
  REF(3)DOT(2)DOT(4)DOT(3)DOT(0) = REF(5);
  REF(5).tsdr = & dr_bottom;
/* new_table 3.2.4.3.1 , 1 */
  if ((ch_returncode = che_new_table(DEF(3)DOT(2)DOT(4)DOT(3)DOT(1),QUAL(1)
    ,sched)) != Normal)  goto ch_raise_exception;
/* unite 3.2.4.3.2 9 , 6 */
  if ((ch_returncode = che_unite(DEF(3)DOT(2)DOT(4)DOT(3)DOT(2),DEF(9),sched,6
    )) != Normal) goto ch_raise_exception;
  current->ip = 7;
cb39:
/* call 3.2.3.2 3.0.3.0.2 3.2 , 2 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(3)DOT(2),
          arguments[1] = DEF(3)DOT(0)DOT(3)DOT(0)DOT(2),
          arguments[2] = DEF(3)DOT(2),
          arguments[2+1] = nil,& arguments[0]),QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
  return;
c40:
/* unite 3.2.4.3.2 4 , 0 */
  if ((ch_returncode = che_unite(DEF(3)DOT(2)DOT(4)DOT(3)DOT(2),DEF(4),sched,0
    )) != Normal) goto ch_raise_exception;
/* copy 14 3.2.4.3.0 */
  if((ch_returncode = cp_nominal(& ch_val, 
    REF(3)DOT(2)DOT(4)DOT(3)DOT(0).value)) != Normal) goto ch_raise_exception;
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  REF(14).value = ch_val;
  REF(14).tsdr = & dr_nominal;
/* insert 3.2.4.2.2 14 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(2)DOT(2),DEF(14)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
/* insert 3.2.4.2.0 3.2.4.3 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(2)DOT(0),
    DEF(3)DOT(2)DOT(4)DOT(3),FALSE,0)) != Normal) goto ch_raise_exception;
/* new_record 3.2.4.3 , 3 */
  if ((ch_val.record = new_record(3)) == nil) goto ch_depletion;
  (*(REF(3)DOT(2)DOT(4)DOT(3).tsdr)->finalize)(REF(3)DOT(2)DOT(4)DOT(3).value
    ,F_DISCARD,sched);
  REF(3)DOT(2)DOT(4)DOT(3).value = ch_val; REF(3)DOT(2)DOT(4)DOT(3).tsdr
     = & dr_record;
/* move 3.2.4.3.0 6 */
  (*(REF(3)DOT(2)DOT(4)DOT(3)DOT(0).tsdr)->finalize)(
    REF(3)DOT(2)DOT(4)DOT(3)DOT(0).value,F_DISCARD,sched);
  REF(3)DOT(2)DOT(4)DOT(3)DOT(0) = REF(6);
  REF(6).tsdr = & dr_bottom;
/* new_table 3.2.4.3.1 , 1 */
  if ((ch_returncode = che_new_table(DEF(3)DOT(2)DOT(4)DOT(3)DOT(1),QUAL(1)
    ,sched)) != Normal)  goto ch_raise_exception;
/* unite 3.2.4.3.2 9 , 6 */
  if ((ch_returncode = che_unite(DEF(3)DOT(2)DOT(4)DOT(3)DOT(2),DEF(9),sched,6
    )) != Normal) goto ch_raise_exception;
/* 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);
c54:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
