#include "chdecl.h"
void CH_fixmin(current, sched, cop)
#define ARGUMENTS 9
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb1;
    case 2: goto c2;
    case 5: goto c34;
    case 3: goto c34;
    case 4: goto cb35;
    case 6: goto c37;
    case 7: goto c39;
    case 8: goto c42;
    case 9: goto c46;  }
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;
/* 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 , 1 */
  if ((ch_returncode = che_new_table(DEF(4)DOT(1),QUAL(1),sched)) != Normal) 
     goto ch_raise_exception;
/* copy 6 3.1 */
  if((ch_returncode = cp_table(& ch_val, REF(3)DOT(1).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;
/* copy 7 3.0 */
  if((ch_returncode = (REF(3)DOT(0).tsdr->copy)(& ch_val, REF(3)DOT(0).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(0).tsdr->number];
/* insert 6 7 */
  if ((ch_returncode = insertfunc(DEF(6),DEF(7),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* copy 8 6 */
  if((ch_returncode = cp_table(& ch_val, REF(6).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;
/* insert 4.1 8 */
  if ((ch_returncode = insertfunc(DEF(4)DOT(1),DEF(8),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* boolean 9 , FALSE */
  REF(9).value.boolean = FALSE;
  REF(9).tsdr = & dr_boolean;
/* find_or_goto 10 3.4 4 , 0,13 */
  if (findfunc(DEF(10),DEF(3)DOT(4),(
          arguments[0] = DEF(4),& arguments[0]),sched,0) == FAILURE) goto c13;
/* boolean 9 , TRUE */
  REF(9).value.boolean = TRUE;
  REF(9).tsdr = & dr_boolean;
c13:
/* branch_false 9 , 42 */
  if ( !REF(9).value.boolean ) goto c42;
/* block , 2 */
  if((ch_returncode = che_block(QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
/* insert 3.5 4 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(5),DEF(4),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* find 11 3.2 3.0 , 0 */
  if (findfunc(DEF(11),DEF(3)DOT(2),(
          arguments[0] = DEF(3)DOT(0),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* find 12 3.3 11.1.0 , 0 */
  if (findfunc(DEF(12),DEF(3)DOT(3),(
          arguments[0] = DEF(11)DOT(1)DOT(0),& arguments[0]),sched,0
            ) == FAILURE) goto ch_notfound;
/* find 13 12.1 11.1.1 , 0 */
  if (findfunc(DEF(13),DEF(12)DOT(1),(
          arguments[0] = DEF(11)DOT(1)DOT(1),& arguments[0]),sched,0
            ) == FAILURE) goto ch_notfound;
/* ord_case 14 13.2 */
  REF(14).value.ord_enum = REF(13)DOT(2).value.variant->info.variant_case;
  REF(14).tsdr = & dr_ord_enumeration;
/* equal 15 14 =(5) */
  REF(15).value.boolean = (REF(14).value.ord_enum == 5);
  REF(15).tsdr = & dr_boolean;
/* ord_case 16 13.2 */
  REF(16).value.ord_enum = REF(13)DOT(2).value.variant->info.variant_case;
  REF(16).tsdr = & dr_ord_enumeration;
/* equal 17 16 =(10) */
  REF(17).value.boolean = (REF(16).value.ord_enum == 10);
  REF(17).tsdr = & dr_boolean;
/* or 18 15 17 */
  REF(18).value.boolean = REF(15).value.boolean|REF(17).value.boolean;
  REF(18).tsdr = & dr_boolean;
/* branch_false 18 , 39 */
  if ( !REF(18).value.boolean ) goto c39;
/* currentprogram 19 */
  if ((ch_val.program = make_pgm_copy(sched->ready->prog)) == nil)
     goto ch_depletion;
  (*(REF(19).tsdr)->finalize)(REF(19).value,F_DISCARD,sched);
  REF(19).value = ch_val; REF(19).tsdr = & dr_program;
/* procedure 20 19 , 3 */
  if ((ch_returncode = che_procedure(DEF(20),DEF(19),QUAL(3)
    ,sched)) != Normal) goto ch_raise_exception;
/* discard 19 */
  (*(REF(19).tsdr)->finalize)(REF(19).value,F_DISCARD,sched);
  REF(19).tsdr = & dr_bottom;
/* move 21 20 */
  (*(REF(21).tsdr)->finalize)(REF(21).value,F_DISCARD,sched);
  REF(21) = REF(20);
  REF(20).tsdr = & dr_bottom;
/* copy 22 13.1 */
  if((ch_returncode = cp_table(& ch_val, REF(13)DOT(1).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(22).tsdr)->finalize)(REF(22).value,F_DISCARD,sched);
  REF(22).value = ch_val;
  REF(22).tsdr = & dr_table;
/* initget 23 22 , 0,0 */
  (*(REF(23).tsdr)->finalize)(REF(23).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(23),DEF(22),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c36:
c34:
/* get_or_goto 23 22 , 37 */
  if ((ch_returncode = get_selected_object(DEF(23),DEF(22),sched)) != Normal)
     goto c37;
  current->ip = 4;
cb35:
/* call 21 23.0 6 13.1 3.3 3.4 3.5 , 4 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(21),
          arguments[1] = DEF(23)DOT(0),
          arguments[2] = DEF(6),
          arguments[3] = DEF(13)DOT(1),
          arguments[4] = DEF(3)DOT(3),
          arguments[5] = DEF(3)DOT(4),
          arguments[6] = DEF(3)DOT(5),
          arguments[6+1] = nil,& arguments[0]),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c37:
/* endget 23 22 */
  end_selector(DEF(23),DEF(22),sched,GET);
/* discard 22 */
  (*(REF(22).tsdr)->finalize)(REF(22).value,F_DISCARD,sched);
  REF(22).tsdr = & dr_bottom;
c39:
/* discard 21 */
  (*(REF(21).tsdr)->finalize)(REF(21).value,F_DISCARD,sched);
  REF(21).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c42:
/* discard 4 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).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);
c46:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
