#include "chdecl.h"
void CH_typestate_pomakefull_proglit(current, sched, cop)
#define ARGUMENTS 10
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb1;
    case 2: goto c2;
    case 3: goto cb9;
    case 4: goto c10;
    case 7: goto c23;
    case 5: goto c23;
    case 6: goto cb28;
    case 8: goto c30;
    case 9: goto c32;
    case 10: goto c36;  }
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:
/* new_record 4 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).value = ch_val; REF(4).tsdr = & dr_record;
/* new_table 4.1 , 1 */
  if ((ch_returncode = che_new_table(DEF(4)DOT(1),QUAL(1),sched)) != Normal) 
     goto ch_raise_exception;
/* unite 4.0 5 , 0 */
  if ((ch_returncode = che_unite(DEF(4)DOT(0),DEF(5),sched,0)) != Normal)
     goto ch_raise_exception;
/* copy 6 3.4 */
  if((ch_returncode = (REF(3)DOT(4).tsdr->copy)(& ch_val, REF(3)DOT(4).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6).value = ch_val;
  REF(6).tsdr = datarepmap[REF(3)DOT(4).tsdr->number];
/* insert 4.1 6 */
  if ((ch_returncode = insertfunc(DEF(4)DOT(1),DEF(6),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* insert 3.6.0 4 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(6)DOT(0),DEF(4)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
  current->ip = 3;
cb9:
/* call 3.0.13 3.0 3.1 3.3 3.2 3.4 7 , 2 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(0)DOT(13),
          arguments[1] = DEF(3)DOT(0),
          arguments[2] = DEF(3)DOT(1),
          arguments[3] = DEF(3)DOT(3),
          arguments[4] = DEF(3)DOT(2),
          arguments[5] = DEF(3)DOT(4),
          arguments[6] = DEF(7),
          arguments[6+1] = nil,& arguments[0]),QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
  return;
c10:
/* noop */
  
/* find 8 3.3 7.0 , 0 */
  if (findfunc(DEF(8),DEF(3)DOT(3),(
          arguments[0] = DEF(7)DOT(0),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* find 9 8.1 7.1 , 0 */
  if (findfunc(DEF(9),DEF(8)DOT(1),(
          arguments[0] = DEF(7)DOT(1),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* ord_case 10 9.2 */
  REF(10).value.ord_enum = REF(9)DOT(2).value.variant->info.variant_case;
  REF(10).tsdr = & dr_ord_enumeration;
/* notequal . 10 =(5) , 32 */
  if ( REF(10).value.ord_enum != 5 ) goto c32;
/* currentprogram 11 */
  if ((ch_val.program = make_pgm_copy(sched->ready->prog)) == nil)
     goto ch_depletion;
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).value = ch_val; REF(11).tsdr = & dr_program;
/* procedure 12 11 , 3 */
  if ((ch_returncode = che_procedure(DEF(12),DEF(11),QUAL(3)
    ,sched)) != Normal) goto ch_raise_exception;
/* discard 11 */
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).tsdr = & dr_bottom;
/* move 13 12 */
  (*(REF(13).tsdr)->finalize)(REF(13).value,F_DISCARD,sched);
  REF(13) = REF(12);
  REF(12).tsdr = & dr_bottom;
/* copy 14 9.1 */
  if((ch_returncode = cp_table(& ch_val, REF(9)DOT(1).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_table;
/* initget 15 14 , 0,0 */
  (*(REF(15).tsdr)->finalize)(REF(15).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(15),DEF(14),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c29:
c23:
/* get_or_goto 15 14 , 30 */
  if ((ch_returncode = get_selected_object(DEF(15),DEF(14),sched)) != Normal)
     goto c30;
/* discard 16 */
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).tsdr = & dr_bottom;
/* copy 16 3.4 */
  if((ch_returncode = (REF(3)DOT(4).tsdr->copy)(& ch_val, REF(3)DOT(4).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).value = ch_val;
  REF(16).tsdr = datarepmap[REF(3)DOT(4).tsdr->number];
/* copy 17 15.0 */
  if((ch_returncode = (REF(15)DOT(0).tsdr->copy)(& ch_val, REF(15)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(17).tsdr)->finalize)(REF(17).value,F_DISCARD,sched);
  REF(17).value = ch_val;
  REF(17).tsdr = datarepmap[REF(15)DOT(0).tsdr->number];
/* insert 16.1 17 */
  if ((ch_returncode = insertfunc(DEF(16)DOT(1),DEF(17),FALSE,0)) != Normal)
     goto ch_raise_exception;
  current->ip = 6;
cb28:
/* call 13 3.0 3.1 3.2 3.3 16 3.5 3.6 , 4 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(13),
          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(16),
          arguments[6] = DEF(3)DOT(5),
          arguments[7] = DEF(3)DOT(6),
          arguments[7+1] = nil,& arguments[0]),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c30:
/* endget 15 14 */
  end_selector(DEF(15),DEF(14),sched,GET);
/* discard 14 */
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  REF(14).tsdr = & dr_bottom;
c32:
/* discard 13 */
  (*(REF(13).tsdr)->finalize)(REF(13).value,F_DISCARD,sched);
  REF(13).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;
/* endblock */
  che_endblock(sched);
c36:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
