#include "chdecl.h"
void CH_codegen_exprusesroot(current, sched, cop)
#define ARGUMENTS 6
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb2;
    case 2: goto c3;
    case 3: goto c21;
    case 4: goto cb22;
    case 5: goto c23;
    case 6: goto c26;
    case 7: goto c40;
    case 8: goto c43;
    case 9: goto c45;
    case 10: goto c54;
    case 11: goto c56;
    case 12: goto c59;
    case 13: goto c62;
    case 14: goto c65;  }
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:
/* case 4 3.0 */
  REF(4).value.enumeration = REF(3)DOT(0).value.variant->info.variant_case;
  REF(4).tsdr = & dr_enumeration;
/* equal . 4 =(1) , 10 */
  if ( REF(4).value.enumeration == 1 ) goto c10;
/* equal . 4 =(0) , 45 */
  if ( REF(4).value.enumeration == 0 ) goto c45;
/* branch , 54 */
   goto c54;
c10:
/* reveal 3.0 , 1 */
  if (1 != REF(3)DOT(0).value.variant->info.variant_case) goto ch_case_error;
/* block , 2 */
  if((ch_returncode = che_block(QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
/* notequal . 3.0.0.2.0 3.1 , 15 */
  if ( !(REF(3)DOT(0)DOT(0)DOT(2)DOT(0).tsdr->equal)(
    REF(3)DOT(0)DOT(0)DOT(2)DOT(0).value,REF(3)DOT(1).value) ) goto c15;
/* exit , 3 */
  ch_e = handler_type__exit; ch_val = QUAL(3); goto ch_exception;
c15:
/* currentprogram 5 */
  if ((ch_val.program = make_pgm_copy(sched->ready->prog)) == nil)
     goto ch_depletion;
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).value = ch_val; REF(5).tsdr = & dr_program;
/* procedure 6 5 , 4 */
  if ((ch_returncode = che_procedure(DEF(6),DEF(5),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
/* discard 5 */
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).tsdr = & dr_bottom;
/* move 7 6 */
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7) = REF(6);
  REF(6).tsdr = & dr_bottom;
/* copy 8 3.0.0.3 */
  if((ch_returncode = cp_table(& ch_val, REF(3)DOT(0)DOT(0)DOT(3).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;
c21:
/* get_or_goto 9 8 , 26 */
  if ((ch_returncode = get_selected_object(DEF(9),DEF(8),sched)) != Normal)
     goto c26;
  current->ip = 4;
cb22:
/* call 7 9 3.1 10 , 5 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(7),
          arguments[1] = DEF(9),
          arguments[2] = DEF(3)DOT(1),
          arguments[3] = DEF(10),
          arguments[3+1] = nil,& arguments[0]),QUAL(5),sched)) != Normal)
     goto ch_raise_exception;
  return;
c23:
/* branch_false 10 , 21 */
  if ( !REF(10).value.boolean ) goto c21;
/* exit , 3 */
  ch_e = handler_type__exit; ch_val = QUAL(3); goto ch_exception;
c26:
/* 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;
/* equal 11 3.0.0.0 =(23) */
  REF(11).value.boolean = (REF(3)DOT(0)DOT(0)DOT(0).value.ord_enum == 23);
  REF(11).tsdr = & dr_boolean;
/* ord_case 12 3.0.0.1 */
  REF(12).value.ord_enum = REF(3)DOT(0)DOT(0)DOT(1).value.variant
    ->info.variant_case;
  REF(12).tsdr = & dr_ord_enumeration;
/* equal 13 12 =(14) */
  REF(13).value.boolean = (REF(12).value.ord_enum == 14);
  REF(13).tsdr = & dr_boolean;
/* or 14 11 13 */
  REF(14).value.boolean = REF(11).value.boolean|REF(13).value.boolean;
  REF(14).tsdr = & dr_boolean;
/* branch_false 14 , 36 */
  if ( !REF(14).value.boolean ) goto c36;
/* exit , 3 */
  ch_e = handler_type__exit; ch_val = QUAL(3); goto ch_exception;
c36:
/* boolean 3.2 , FALSE */
  REF(3)DOT(2).value.boolean = FALSE;
  REF(3)DOT(2).tsdr = & dr_boolean;
/* endblock */
  che_endblock(sched);
/* branch , 43 */
   goto c43;
c40:
/* discard 7 */
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).tsdr = & dr_bottom;
/* boolean 3.2 , TRUE */
  REF(3)DOT(2).value.boolean = TRUE;
  REF(3)DOT(2).tsdr = & dr_boolean;
c43:
/* discard 7 */
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).tsdr = & dr_bottom;
/* branch , 56 */
   goto c56;
c45:
/* reveal 3.0 , 0 */
  if (0 != REF(3)DOT(0).value.variant->info.variant_case) goto ch_case_error;
/* notequal . 3.0.0.0 3.1 , 51 */
  if ( !(REF(3)DOT(0)DOT(0)DOT(0).tsdr->equal)(REF(3)DOT(0)DOT(0)DOT(0).value,
    REF(3)DOT(1).value) ) goto c51;
/* boolean 3.2 , TRUE */
  REF(3)DOT(2).value.boolean = TRUE;
  REF(3)DOT(2).tsdr = & dr_boolean;
/* branch , 56 */
   goto c56;
c51:
/* boolean 3.2 , FALSE */
  REF(3)DOT(2).value.boolean = FALSE;
  REF(3)DOT(2).tsdr = & dr_boolean;
/* branch , 56 */
   goto c56;
c54:
/* exit , 6 */
  ch_e = handler_type__exit; ch_val = QUAL(6); goto ch_exception;
c56:
/* 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 , 62 */
   goto c62;
c59:
/* chs_lit 15 , "Exit to cantHappen in exprUsesRoot" */
  if( !chs_lit(DEF(15),"Exit to cantHappen in exprUsesRoot") )
     goto ch_depletion;
/* print 15 */
  re_print(stderr, 0, DEF(15)); fflush(stderr);
/* discard 15 */
  (*(REF(15).tsdr)->finalize)(REF(15).value,F_DISCARD,sched);
  REF(15).tsdr = & dr_bottom;
c62:
/* discard 3 */
  (*(REF(3).tsdr)->finalize)(REF(3).value,F_DISCARD,sched);
  REF(3).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c65:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
