#include "chdecl.h"
void CH_chcode_chtransform_proglit(current, sched, cop)
#define ARGUMENTS 6
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb1;
    case 2: goto c2;
    case 3: goto c6;
    case 4: goto cb22;
    case 6: goto cb24;
    case 8: goto c26;
    case 9: goto cb27;
    case 11: goto c29;
    case 12: goto c35;
    case 13: goto cb37;
    case 14: goto c38;
    case 15: goto c42;
    case 16: goto c46;
    case 17: goto c52;
    case 18: goto cb54;
    case 19: goto c55;
    case 20: goto c59;
    case 10: goto c63;
    case 7: goto c63;
    case 5: goto c63;
    case 21: goto c63;
    case 22: goto c73;
    case 23: goto c78;  }
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:
/* boolean 3.3 , FALSE */
  REF(3)DOT(3).value.boolean = FALSE;
  REF(3)DOT(3).tsdr = & dr_boolean;
/* copy 4 3.1 */
  if((ch_returncode = cp_table(& ch_val, REF(3)DOT(1).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).value = ch_val;
  REF(4).tsdr = & dr_table;
/* initget 5 4 , 0,0 */
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(5),DEF(4),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c6:
/* get_or_goto 5 4 , 73 */
  if ((ch_returncode = get_selected_object(DEF(5),DEF(4),sched)) != Normal)
     goto c73;
/* 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];
/* copy 7 6.2 */
  if((ch_returncode = cp_variant(& ch_val, REF(6)DOT(2).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).value = ch_val;
  REF(7).tsdr = & dr_variant;
/* case 8 7 */
  REF(8).value.enumeration = REF(7).value.variant->info.variant_case;
  REF(8).tsdr = & dr_enumeration;
/* equal . 8 =(5) , 18 */
  if ( REF(8).value.enumeration == 5 ) goto c18;
/* equal . 8 =(2) , 26 */
  if ( REF(8).value.enumeration == 2 ) goto c26;
/* equal . 8 =(9) , 29 */
  if ( REF(8).value.enumeration == 9 ) goto c29;
/* branch , 46 */
   goto c46;
c18:
/* reveal 7 , 5 */
  if (5 != REF(7).value.variant->info.variant_case) goto ch_case_error;
/* notequal . 6.0 =(45) , 24 */
  if ( REF(6)DOT(0).value.enumeration != 45 ) goto c24;
  current->ip = 4;
cb22:
/* call 3.2 3.0 7.0.0 9 , 1 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2),
          arguments[1] = DEF(3)DOT(0),
          arguments[2] = DEF(7)DOT(0)DOT(0),
          arguments[3] = DEF(9),
          arguments[3+1] = nil,& arguments[0]),QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
  return;
c24:
  current->ip = 6;
cb24:
/* call 3.2 3.0 7.0.1 9 , 1 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2),
          arguments[1] = DEF(3)DOT(0),
          arguments[2] = DEF(7)DOT(0)DOT(1),
          arguments[3] = DEF(9),
          arguments[3+1] = nil,& arguments[0]),QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
  return;
c26:
/* reveal 7 , 2 */
  if (2 != REF(7).value.variant->info.variant_case) goto ch_case_error;
  current->ip = 9;
cb27:
/* call 3.2 3.0 7.0 9 , 1 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2),
          arguments[1] = DEF(3)DOT(0),
          arguments[2] = DEF(7)DOT(0),
          arguments[3] = DEF(9),
          arguments[3+1] = nil,& arguments[0]),QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
  return;
c29:
/* boolean 9 , FALSE */
  REF(9).value.boolean = FALSE;
  REF(9).tsdr = & dr_boolean;
/* reveal 7 , 9 */
  if (9 != REF(7).value.variant->info.variant_case) goto ch_case_error;
/* new_table 10 , 2 */
  if ((ch_returncode = che_new_table(DEF(10),QUAL(2),sched)) != Normal) 
     goto ch_raise_exception;
/* copy 11 7.0 */
  if((ch_returncode = cp_table(& ch_val, REF(7)DOT(0).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).value = ch_val;
  REF(11).tsdr = & dr_table;
/* initget 12 11 , 0,0 */
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(12),DEF(11),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c35:
/* get_or_goto 12 11 , 42 */
  if ((ch_returncode = get_selected_object(DEF(12),DEF(11),sched)) != Normal)
     goto c42;
/* copy 13 12 */
  if((ch_returncode = (REF(12).tsdr->copy)(& 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 = datarepmap[REF(12).tsdr->number];
  current->ip = 13;
cb37:
/* call 3.2 3.0 13.1 14 , 1 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2),
          arguments[1] = DEF(3)DOT(0),
          arguments[2] = DEF(13)DOT(1),
          arguments[3] = DEF(14),
          arguments[3+1] = nil,& arguments[0]),QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
  return;
c38:
/* or 9 9 14 */
  REF(9).value.boolean = REF(9).value.boolean|REF(14).value.boolean;
  REF(9).tsdr = & dr_boolean;
/* insert 10 13 */
  if ((ch_returncode = insertfunc(DEF(10),DEF(13),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* branch , 35 */
   goto c35;
c42:
/* endget 12 11 */
  end_selector(DEF(12),DEF(11),sched,GET);
/* discard 11 */
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).tsdr = & dr_bottom;
/* move 7.0 10 */
  (*(REF(7)DOT(0).tsdr)->finalize)(REF(7)DOT(0).value,F_DISCARD,sched);
  REF(7)DOT(0) = REF(10);
  REF(10).tsdr = & dr_bottom;
/* branch , 63 */
   goto c63;
c46:
/* boolean 9 , FALSE */
  REF(9).value.boolean = FALSE;
  REF(9).tsdr = & dr_boolean;
/* reveal 7 , 11 */
  if (11 != REF(7).value.variant->info.variant_case) goto ch_case_error;
/* new_table 15 , 3 */
  if ((ch_returncode = che_new_table(DEF(15),QUAL(3),sched)) != Normal) 
     goto ch_raise_exception;
/* copy 16 7.0 */
  if((ch_returncode = cp_table(& ch_val, REF(7)DOT(0).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;
/* initget 17 16 , 0,0 */
  (*(REF(17).tsdr)->finalize)(REF(17).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(17),DEF(16),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c52:
/* get_or_goto 17 16 , 59 */
  if ((ch_returncode = get_selected_object(DEF(17),DEF(16),sched)) != Normal)
     goto c59;
/* copy 18 17 */
  if((ch_returncode = (REF(17).tsdr->copy)(& ch_val, REF(17).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(17).tsdr->number];
  current->ip = 18;
cb54:
/* call 3.2 3.0 18 19 , 1 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2),
          arguments[1] = DEF(3)DOT(0),
          arguments[2] = DEF(18),
          arguments[3] = DEF(19),
          arguments[3+1] = nil,& arguments[0]),QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
  return;
c55:
/* or 9 9 19 */
  REF(9).value.boolean = REF(9).value.boolean|REF(19).value.boolean;
  REF(9).tsdr = & dr_boolean;
/* insert 15 18 */
  if ((ch_returncode = insertfunc(DEF(15),DEF(18),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* branch , 52 */
   goto c52;
c59:
/* endget 17 16 */
  end_selector(DEF(17),DEF(16),sched,GET);
/* discard 16 */
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).tsdr = & dr_bottom;
/* move 7.0 15 */
  (*(REF(7)DOT(0).tsdr)->finalize)(REF(7)DOT(0).value,F_DISCARD,sched);
  REF(7)DOT(0) = REF(15);
  REF(15).tsdr = & dr_bottom;
c28:
c25:
c23:
c63:
/* branch_false 9 , 71 */
  if ( !REF(9).value.boolean ) goto c71;
/* 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 20 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(20).tsdr)->finalize)(REF(20).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(20).value,ch_i);
  REF(20).tsdr = qdatarepmap[ch_t->tsdr->number];
/* remove_at 21 3.0 5 */
  if ((ch_returncode = remove_at_func(DEF(21),DEF(3)DOT(0),
    REF(5).value.integer)) != Normal) goto ch_raise_exception;
/* move 21.2 7 */
  (*(REF(21)DOT(2).tsdr)->finalize)(REF(21)DOT(2).value,F_DISCARD,sched);
  REF(21)DOT(2) = REF(7);
  REF(7).tsdr = & dr_bottom;
/* insert_at 3.0 21 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(21),TRUE, ch_i)) != Normal)
     goto ch_raise_exception;
/* boolean 3.3 , TRUE */
  REF(3)DOT(3).value.boolean = TRUE;
  REF(3)DOT(3).tsdr = & dr_boolean;
c71:
/* discard 7 */
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).tsdr = & dr_bottom;
/* branch , 6 */
   goto c6;
c73:
/* endget 5 4 */
  end_selector(DEF(5),DEF(4),sched,GET);
/* 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);
c78:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
