#include "chdecl.h"
void CH_fixfull_proglit(current, sched, cop)
#define ARGUMENTS 9
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb2;
    case 2: goto c3;
    case 3: goto c13;
    case 7: goto c26;
    case 4: goto c26;
    case 5: goto c38;
    case 6: goto cb39;
    case 8: goto c41;
    case 9: goto c43;
    case 10: goto c46;
    case 11: goto c48;
    case 12: goto c52;
    case 13: goto c56;
    case 14: goto c58;  }
c0:
/* block , 0 */
  if((ch_returncode = che_block(QUAL(0),sched)) != Normal)
     goto ch_raise_exception;
/* block , 1 */
  if((ch_returncode = che_block(QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
  current->ip = 1;
cb2:
/* receive 3 0 */
  if ((ch_returncode = che_receive(DEF(3),DEF(0),sched)) != Normal)
     goto ch_raise_exception;
  return;
c3:
/* block , 2 */
  if((ch_returncode = che_block(QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
/* 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;
/* unite 4.0 5 , 0 */
  if ((ch_returncode = che_unite(DEF(4)DOT(0),DEF(5),sched,0)) != Normal)
     goto ch_raise_exception;
/* new_table 4.1 , 3 */
  if ((ch_returncode = che_new_table(DEF(4)DOT(1),QUAL(3),sched)) != Normal) 
     goto ch_raise_exception;
/* copy 6 3.2 */
  if((ch_returncode = cp_table(& ch_val, REF(3)DOT(2).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6).value = ch_val;
  REF(6).tsdr = & dr_table;
/* insert 4.1 6 */
  if ((ch_returncode = insertfunc(DEF(4)DOT(1),DEF(6),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* insert 3.1 4 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(1),DEF(4),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* endblock */
  che_endblock(sched);
c13:
/* discard 4 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).tsdr = & dr_bottom;
/* find 7 3.0 3.3.0 , 0 */
  if (findfunc(DEF(7),DEF(3)DOT(0),(
          arguments[0] = DEF(3)DOT(3)DOT(0),& arguments[0]),sched,0
            ) == FAILURE) goto ch_notfound;
/* find 8 7.1 3.3.1 , 0 */
  if (findfunc(DEF(8),DEF(7)DOT(1),(
          arguments[0] = DEF(3)DOT(3)DOT(1),& arguments[0]),sched,0
            ) == FAILURE) goto ch_notfound;
/* ord_case 9 8.2 */
  REF(9).value.ord_enum = REF(8)DOT(2).value.variant->info.variant_case;
  REF(9).tsdr = & dr_ord_enumeration;
/* equal 10 9 =(5) */
  REF(10).value.boolean = (REF(9).value.ord_enum == 5);
  REF(10).tsdr = & dr_boolean;
/* ord_case 11 8.2 */
  REF(11).value.ord_enum = REF(8)DOT(2).value.variant->info.variant_case;
  REF(11).tsdr = & dr_ord_enumeration;
/* equal 12 11 =(10) */
  REF(12).value.boolean = (REF(11).value.ord_enum == 10);
  REF(12).tsdr = & dr_boolean;
/* or 13 10 12 */
  REF(13).value.boolean = REF(10).value.boolean|REF(12).value.boolean;
  REF(13).tsdr = & dr_boolean;
/* branch_false 13 , 43 */
  if ( !REF(13).value.boolean ) goto c43;
/* copy 14 8.1 */
  if((ch_returncode = cp_table(& ch_val, REF(8)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;
c40:
c26:
/* get_or_goto 15 14 , 41 */
  if ((ch_returncode = get_selected_object(DEF(15),DEF(14),sched)) != Normal)
     goto c41;
/* discard 16 */
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).tsdr = & dr_bottom;
/* discard 17 */
  (*(REF(17).tsdr)->finalize)(REF(17).value,F_DISCARD,sched);
  REF(17).tsdr = & dr_bottom;
/* copy 16 3.2 */
  if((ch_returncode = cp_table(& ch_val, REF(3)DOT(2).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).value = ch_val;
  REF(16).tsdr = & dr_table;
/* copy 18 15.0 */
  if((ch_returncode = (REF(15)DOT(0).tsdr->copy)(& ch_val, REF(15)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(18).tsdr)->finalize)(REF(18).value,F_DISCARD,sched);
  REF(18).value = ch_val;
  REF(18).tsdr = datarepmap[REF(15)DOT(0).tsdr->number];
/* insert 16 18 */
  if ((ch_returncode = insertfunc(DEF(16),DEF(18),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* copy 17 3.4 */
  if((ch_returncode = cp_table(& ch_val, REF(3)DOT(4).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(17).tsdr)->finalize)(REF(17).value,F_DISCARD,sched);
  REF(17).value = ch_val;
  REF(17).tsdr = & dr_table;
/* block , 4 */
  if((ch_returncode = che_block(QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
/* copy 19 15.1 */
  if((ch_returncode = (REF(15)DOT(1).tsdr->copy)(& ch_val, REF(15)DOT(1).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(15)DOT(1).tsdr->number];
/* insert 17 19 */
  if ((ch_returncode = insertfunc(DEF(17),DEF(19),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* endblock */
  che_endblock(sched);
/* branch , 39 */
   goto c39;
c38:
/* exit , 5 */
  ch_e = handler_type__exit; ch_val = QUAL(5); goto ch_exception;
c39:
  current->ip = 6;
cb39:
/* call 3.5 3.0 3.1 16 15.1 17 3.5 , 6 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(5),
          arguments[1] = DEF(3)DOT(0),
          arguments[2] = DEF(3)DOT(1),
          arguments[3] = DEF(16),
          arguments[4] = DEF(15)DOT(1),
          arguments[5] = DEF(17),
          arguments[6] = DEF(3)DOT(5),
          arguments[6+1] = nil,& arguments[0]),QUAL(6),sched)) != Normal)
     goto ch_raise_exception;
  return;
c41:
/* 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;
c43:
/* 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 , 56 */
   goto c56;
c46:
/* 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;
/* branch , 56 */
   goto c56;
c48:
/* discard 16 */
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).tsdr = & dr_bottom;
/* discard 17 */
  (*(REF(17).tsdr)->finalize)(REF(17).value,F_DISCARD,sched);
  REF(17).tsdr = & dr_bottom;
/* return_exception 3 , 7 */
  if (ch_caller = do_return(REF(3).value)) {
    raise_user(QUAL(7),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(3),QUAL(7));
  REF(3).tsdr = & dr_bottom;
/* branch , 56 */
   goto c56;
c52:
/* discard 16 */
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).tsdr = & dr_bottom;
/* discard 17 */
  (*(REF(17).tsdr)->finalize)(REF(17).value,F_DISCARD,sched);
  REF(17).tsdr = & dr_bottom;
/* discard 19 */
  (*(REF(19).tsdr)->finalize)(REF(19).value,F_DISCARD,sched);
  REF(19).tsdr = & dr_bottom;
/* return_exception 3 , 7 */
  if (ch_caller = do_return(REF(3).value)) {
    raise_user(QUAL(7),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(3),QUAL(7));
  REF(3).tsdr = & dr_bottom;
c56:
/* endblock */
  che_endblock(sched);
c58:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
