#include "chdecl.h"
void CH_fixfull(current, sched, cop)
#define ARGUMENTS 9
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb5;
    case 2: goto c6;
    case 3: goto c9;
    case 4: goto c20;
    case 5: goto cb31;
    case 6: goto c32;
    case 7: goto c35;
    case 8: goto c42;
    case 9: goto c44;
    case 10: goto c46;
    case 11: goto c48;
    case 12: goto c64;
    case 13: goto c65;
    case 14: goto c69;  }
c0:
/* block , 0 */
  if((ch_returncode = che_block(QUAL(0),sched)) != Normal)
     goto ch_raise_exception;
/* prog_lit 3 , 1 */
  if ((ch_returncode = che_prog_lit(DEF(3),QUAL(1),sched)) != Normal) 
     goto ch_raise_exception;
/* procedure 4 3 , 2 */
  if ((ch_returncode = che_procedure(DEF(4),DEF(3),QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
/* discard 3 */
  (*(REF(3).tsdr)->finalize)(REF(3).value,F_DISCARD,sched);
  REF(3).tsdr = & dr_bottom;
/* move 5 4 */
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5) = REF(4);
  REF(4).tsdr = & dr_bottom;
  current->ip = 1;
cb5:
/* receive 6 0 */
  if ((ch_returncode = che_receive(DEF(6),DEF(0),sched)) != Normal)
     goto ch_raise_exception;
  return;
c6:
/* new_table 7 , 3 */
  if ((ch_returncode = che_new_table(DEF(7),QUAL(3),sched)) != Normal) 
     goto ch_raise_exception;
/* copy 8 6.1 */
  if((ch_returncode = cp_table(& ch_val, REF(6)DOT(1).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_table;
/* initget 9 8 , 0,0 */
  (*(REF(9).tsdr)->finalize)(REF(9).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(9),DEF(8),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c9:
/* get_or_goto 9 8 , 48 */
  if ((ch_returncode = get_selected_object(DEF(9),DEF(8),sched)) != Normal)
     goto c48;
/* case 10 9.0 */
  REF(10).value.enumeration = REF(9)DOT(0).value.variant->info.variant_case;
  REF(10).tsdr = & dr_enumeration;
/* notequal . 10 =(5) , 44 */
  if ( REF(10).value.enumeration != 5 ) goto c44;
/* block , 4 */
  if((ch_returncode = che_block(QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
/* copy 11 6.2 */
  if((ch_returncode = (REF(6)DOT(2).tsdr->copy)(& ch_val, REF(6)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(6)DOT(2).tsdr->number];
/* lookup_at 12 9.1 =(0) */
  if ( !((ch_t = REF(9)DOT(1).value.table)->size) ) goto ch_notfound;
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(12).value,0);
  REF(12).tsdr = qdatarepmap[ch_t->tsdr->number];
/* copy 13 12 */
  if((ch_returncode = cp_table(& ch_val, REF(12).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_table;
/* initget 14 13 , 0,0 */
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(14),DEF(13),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c20:
/* get_or_goto 14 13 , 26 */
  if ((ch_returncode = get_selected_object(DEF(14),DEF(13),sched)) != Normal)
     goto c26;
/* find 15 6.0 11.0 , 0 */
  if (findfunc(DEF(15),DEF(6)DOT(0),(
          arguments[0] = DEF(11)DOT(0),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* find 16 15.1 11.1 , 0 */
  if (findfunc(DEF(16),DEF(15)DOT(1),(
          arguments[0] = DEF(11)DOT(1),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* find 17 16.1 14 , 0 */
  if (findfunc(DEF(17),DEF(16)DOT(1),(
          arguments[0] = DEF(14),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* copy 11 17.1 */
  if((ch_returncode = (REF(17)DOT(1).tsdr->copy)(& ch_val, REF(17)DOT(1).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(17)DOT(1).tsdr->number];
/* branch , 20 */
   goto c20;
c26:
/* endget 14 13 */
  end_selector(DEF(14),DEF(13),sched,GET);
/* discard 13 */
  (*(REF(13).tsdr)->finalize)(REF(13).value,F_DISCARD,sched);
  REF(13).tsdr = & dr_bottom;
/* new_table 18 , 3 */
  if ((ch_returncode = che_new_table(DEF(18),QUAL(3),sched)) != Normal) 
     goto ch_raise_exception;
/* copy 19 11 */
  if((ch_returncode = (REF(11).tsdr->copy)(& ch_val, REF(11).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(19).tsdr)->finalize)(REF(19).value,F_DISCARD,sched);
  REF(19).value = ch_val;
  REF(19).tsdr = datarepmap[REF(11).tsdr->number];
/* insert 18 19 */
  if ((ch_returncode = insertfunc(DEF(18),DEF(19),FALSE,0)) != Normal)
     goto ch_raise_exception;
  current->ip = 5;
cb31:
/* call 5 6.0 7 12 11 18 5 , 5 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(5),
          arguments[1] = DEF(6)DOT(0),
          arguments[2] = DEF(7),
          arguments[3] = DEF(12),
          arguments[4] = DEF(11),
          arguments[5] = DEF(18),
          arguments[6] = DEF(5),
          arguments[6+1] = nil,& arguments[0]),QUAL(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c32:
/* endblock */
  che_endblock(sched);
/* branch , 42 */
   goto c42;
c35:
/* discard 18 */
  (*(REF(18).tsdr)->finalize)(REF(18).value,F_DISCARD,sched);
  REF(18).tsdr = & dr_bottom;
/* copy 20 6.3 */
  if((ch_returncode = (REF(6)DOT(3).tsdr->copy)(& ch_val, REF(6)DOT(3).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(20).tsdr)->finalize)(REF(20).value,F_DISCARD,sched);
  REF(20).value = ch_val;
  REF(20).tsdr = datarepmap[REF(6)DOT(3).tsdr->number];
/* chs_lit 21 , "'full' applied to infinite structure" */
  if( !chs_lit(DEF(21),"'full' applied to infinite structure") )
     goto ch_depletion;
/* unite 22 21 , 3 */
  if ((ch_returncode = che_unite(DEF(22),DEF(21),sched,3)) != Normal)
     goto ch_raise_exception;
/* insert 20.2 22 */
  if ((ch_returncode = insertfunc(DEF(20)DOT(2),DEF(22),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* insert 6.4 20 */
  if ((ch_returncode = insertfunc(DEF(6)DOT(4),DEF(20),FALSE,0)) != Normal)
     goto ch_raise_exception;
c42:
/* discard 18 */
  (*(REF(18).tsdr)->finalize)(REF(18).value,F_DISCARD,sched);
  REF(18).tsdr = & dr_bottom;
/* branch , 46 */
   goto c46;
c44:
/* copy 23 9 */
  if((ch_returncode = (REF(9).tsdr->copy)(& ch_val, REF(9).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(23).tsdr)->finalize)(REF(23).value,F_DISCARD,sched);
  REF(23).value = ch_val;
  REF(23).tsdr = datarepmap[REF(9).tsdr->number];
/* insert 7 23 */
  if ((ch_returncode = insertfunc(DEF(7),DEF(23),FALSE,0)) != Normal)
     goto ch_raise_exception;
c46:
/* discard 11 */
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).tsdr = & dr_bottom;
/* branch , 9 */
   goto c9;
c48:
/* endget 9 8 */
  end_selector(DEF(9),DEF(8),sched,GET);
/* discard 8 */
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  REF(8).tsdr = & dr_bottom;
/* size 24 7 */
  REF(24).value.integer = REF(7).value.table->size;
  REF(24).tsdr = & dr_integer;
/* ile . 24 =(0) , 65 */
  if ( REF(24).value.integer <= 0 ) goto c65;
/* block , 6 */
  if((ch_returncode = che_block(QUAL(6),sched)) != Normal)
     goto ch_raise_exception;
/* new_record 25 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(25).tsdr)->finalize)(REF(25).value,F_DISCARD,sched);
  REF(25).value = ch_val; REF(25).tsdr = & dr_record;
/* unite 25.0 26 , 0 */
  if ((ch_returncode = che_unite(DEF(25)DOT(0),DEF(26),sched,0)) != Normal)
     goto ch_raise_exception;
/* new_table 25.1 , 7 */
  if ((ch_returncode = che_new_table(DEF(25)DOT(1),QUAL(7),sched)) != Normal) 
     goto ch_raise_exception;
/* new_table 27 , 7 */
  if ((ch_returncode = che_new_table(DEF(27),QUAL(7),sched)) != Normal) 
     goto ch_raise_exception;
/* insert 25.1 27 */
  if ((ch_returncode = insertfunc(DEF(25)DOT(1),DEF(27),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* insert 7 25 */
  if ((ch_returncode = insertfunc(DEF(7),DEF(25),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* endblock */
  che_endblock(sched);
c64:
/* discard 25 */
  (*(REF(25).tsdr)->finalize)(REF(25).value,F_DISCARD,sched);
  REF(25).tsdr = & dr_bottom;
c65:
/* move 6.1 7 */
  (*(REF(6)DOT(1).tsdr)->finalize)(REF(6)DOT(1).value,F_DISCARD,sched);
  REF(6)DOT(1) = REF(7);
  REF(7).tsdr = & dr_bottom;
/* return 6 */
  if (ch_caller = do_return(REF(6).value)) {
    if (ch_caller->type < CProcess) ch_caller->ip++;
      sched->wakeup_proc(sched, ch_caller);}
  else rem_return(REF(6).value);
  REF(6).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c69:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
