#include "chdecl.h"
void CH_makehermes_uptolow(current, sched, cop)
#define ARGUMENTS 5
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb2;
    case 2: goto c3;
    case 3: goto c11;
    case 4: goto c44;
    case 5: goto c45;
    case 6: goto c47;  }
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:
/* size 4 3.0 */
  REF(4).value.integer = REF(3)DOT(0).value.table->size;
  REF(4).tsdr = & dr_integer;
/* ige . 4 =(1) , 9 */
  if ( REF(4).value.integer >= 1 ) goto c9;
/* exit , 2 */
  ch_e = handler_type__exit; ch_val = QUAL(2); goto ch_exception;
c9:
/* ilit 5 , 0 */
  REF(5).value.integer = 0;
  REF(5).tsdr = & dr_integer;
c11:
/* ige . 5 4 , 41 */
  if ( REF(5).value.integer >= REF(4).value.integer ) goto c41;
/* privatize 3.0 */
  if (REF(3)DOT(0).value.table->refcount != 1)
    if ((ch_returncode = doCopyOnWrite(DEF(3)DOT(0))) != Normal)
       goto ch_raise_exception;
/* lookup_at 6 3.0 5 */
  if((ch_i = REF(5).value.integer) < 0 || ch_i >= (ch_t = REF(3)DOT(0).value
    .table)->size) goto ch_notfound;
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(6).value,ch_i);
  REF(6).tsdr = qdatarepmap[ch_t->tsdr->number];
/* remove_at 7 3.0 5 */
  if ((ch_returncode = remove_at_func(DEF(7),DEF(3)DOT(0),REF(5).value.integer
    )) != Normal) goto ch_raise_exception;
/* oecvt_int 8 7 */
  REF(8).value.integer = REF(7).value.ord_enum;
  REF(8).tsdr = & dr_integer;
/* ige 9 8 =(65) */
  REF(9).value.boolean = (REF(8).value.integer >= 65);
/* ile 10 8 =(90) */
  REF(10).value.boolean = (REF(8).value.integer <= 90);
/* and 11 9 10 */
  REF(11).value.boolean = REF(9).value.boolean&REF(10).value.boolean;
  REF(11).tsdr = & dr_boolean;
/* branch_false 11 , 36 */
  if ( !REF(11).value.boolean ) goto c36;
/* iadd 12 =(97) 8 */
  if (!chf_iadd(DEF(12),97,REF(8).value.integer)) goto ch_depletion;
/* isubtract 13 12 =(65) */
  if (!chf_isubtract(DEF(13),REF(12).value.integer,65)) goto ch_depletion;
/* icvt_enum 14 13 , 128 */
  if (REF(13).value.integer < 0 || REF(13).value.integer >= 128)
     goto ch_range_error;
  REF(14).value.ord_enum = REF(13).value.integer;
  REF(14).tsdr = & dr_ord_enumeration;
/* insert_at 3.0 14 5 */
  ch_i = REF(5).value.integer;
  if (ch_i < 0 || REF(3)DOT(0).value.table->size < ch_i) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(3)DOT(0),DEF(14),TRUE, ch_i)) != Normal)
     goto ch_raise_exception;
/* branch , 37 */
   goto c37;
c36:
/* insert_at 3.0 7 5 */
  ch_i = REF(5).value.integer;
  if (ch_i < 0 || REF(3)DOT(0).value.table->size < ch_i) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(3)DOT(0),DEF(7),TRUE, ch_i)) != Normal)
     goto ch_raise_exception;
c37:
/* noop */
  
/* iadd 5 5 =(1) */
  if (!chf_iadd(DEF(5),REF(5).value.integer,1)) goto ch_depletion;
/* branch , 11 */
   goto c11;
c41:
/* 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 , 45 */
   goto c45;
c44:
/* 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;
c45:
/* endblock */
  che_endblock(sched);
c47:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
