#include "chdecl.h"
void CH_chcode_chassign(current, sched, cop)
#define ARGUMENTS 8
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb1;
    case 2: goto c2;
    case 3: goto c15;
    case 4: goto c32;
    case 5: goto c39;
    case 6: goto c47;
    case 7: goto c105;
    case 8: goto c106;
    case 9: goto c111;  }
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:
/* copy 4 3.1 */
  if((ch_returncode = (REF(3)DOT(1).tsdr->copy)(& 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 = datarepmap[REF(3)DOT(1).tsdr->number];
/* move 5 4.0 */
  REF(5) = REF(4)DOT(0);
  REF(4)DOT(0).tsdr = & dr_bottom;
/* move 6 4.1 */
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6) = REF(4)DOT(1);
  REF(4)DOT(1).tsdr = & dr_bottom;
/* privatize 6 */
  if (REF(6).value.table->refcount != 1)
    if ((ch_returncode = doCopyOnWrite(DEF(6))) != Normal)
       goto ch_raise_exception;
/* lookup_at 7 6 =(0) */
  if ( !((ch_t = REF(6).value.table)->size) ) goto ch_notfound;
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(7).value,0);
  REF(7).tsdr = qdatarepmap[ch_t->tsdr->number];
/* remove_at 8 6 =(0) */
  if ((ch_returncode = remove_at_func(DEF(8),DEF(6),0)) != Normal)
     goto ch_raise_exception;
/* notequal . 3.0 =(0) , 47 */
  if ( REF(3)DOT(0).value.enumeration != 0 ) goto c47;
/* notequal . 5 =(90) , 32 */
  if ( REF(5).value.enumeration != 90 ) goto c32;
c15:
/* size 9 6 */
  REF(9).value.integer = REF(6).value.table->size;
  REF(9).tsdr = & dr_integer;
/* equal . 9 =(0) , 106 */
  if ( REF(9).value.integer == 0 ) goto c106;
/* privatize 6 */
  if (REF(6).value.table->refcount != 1)
    if ((ch_returncode = doCopyOnWrite(DEF(6))) != Normal)
       goto ch_raise_exception;
/* lookup_at 10 6 =(0) */
  if ( !((ch_t = REF(6).value.table)->size) ) goto ch_notfound;
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(10).value,0);
  REF(10).tsdr = qdatarepmap[ch_t->tsdr->number];
/* remove_at 11 6 =(0) */
  if ((ch_returncode = remove_at_func(DEF(11),DEF(6),0)) != Normal)
     goto ch_raise_exception;
/* privatize 3.2 */
  if (REF(3)DOT(2).value.table->refcount != 1)
    if ((ch_returncode = doCopyOnWrite(DEF(3)DOT(2))) != Normal)
       goto ch_raise_exception;
/* lookup_at 12 3.2 11 */
  if((ch_i = REF(11).value.integer) < 0 || ch_i >= (ch_t = REF(3)DOT(2).value
    .table)->size) goto ch_notfound;
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(12).value,ch_i);
  REF(12).tsdr = qdatarepmap[ch_t->tsdr->number];
/* remove_at 13 3.2 11 */
  if ((ch_returncode = remove_at_func(DEF(13),DEF(3)DOT(2),
    REF(11).value.integer)) != Normal) goto ch_raise_exception;
/* iadd 13.2 13.2 =(1) */
  if (!chf_iadd(DEF(13)DOT(2),REF(13)DOT(2).value.integer,1))
     goto ch_depletion;
/* insert_at 3.2 13 11 */
  ch_i = REF(11).value.integer;
  if (ch_i < 0 || REF(3)DOT(2).value.table->size < ch_i) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(3)DOT(2),DEF(13),TRUE, ch_i)) != Normal)
     goto ch_raise_exception;
/* branch , 15 */
   goto c15;
c32:
/* noop */
  
/* notequal . 5 =(49) , 106 */
  if ( REF(5).value.enumeration != 49 ) goto c106;
/* block , 1 */
  if((ch_returncode = che_block(QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
/* insert 3.3 8 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(3),DEF(8),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* endblock */
  che_endblock(sched);
/* branch , 106 */
   goto c106;
c39:
/* privatize 3.2 */
  if (REF(3)DOT(2).value.table->refcount != 1)
    if ((ch_returncode = doCopyOnWrite(DEF(3)DOT(2))) != Normal)
       goto ch_raise_exception;
/* lookup_at 14 3.2 8 */
  if((ch_i = REF(8).value.integer) < 0 || ch_i >= (ch_t = REF(3)DOT(2).value
    .table)->size) goto ch_notfound;
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(14).value,ch_i);
  REF(14).tsdr = qdatarepmap[ch_t->tsdr->number];
/* remove_at 13 3.2 8 */
  if ((ch_returncode = remove_at_func(DEF(13),DEF(3)DOT(2),
    REF(8).value.integer)) != Normal) goto ch_raise_exception;
/* iadd 13.2 13.2 =(1) */
  if (!chf_iadd(DEF(13)DOT(2),REF(13)DOT(2).value.integer,1))
     goto ch_depletion;
/* insert_at 3.2 13 8 */
  ch_i = REF(8).value.integer;
  if (ch_i < 0 || REF(3)DOT(2).value.table->size < ch_i) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(3)DOT(2),DEF(13),TRUE, ch_i)) != Normal)
     goto ch_raise_exception;
/* branch , 106 */
   goto c106;
c47:
/* privatize 3.2 */
  if (REF(3)DOT(2).value.table->refcount != 1)
    if ((ch_returncode = doCopyOnWrite(DEF(3)DOT(2))) != Normal)
       goto ch_raise_exception;
/* lookup_at 15 3.2 8 */
  if((ch_i = REF(8).value.integer) < 0 || ch_i >= (ch_t = REF(3)DOT(2).value
    .table)->size) goto ch_notfound;
  (*(REF(15).tsdr)->finalize)(REF(15).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(15).value,ch_i);
  REF(15).tsdr = qdatarepmap[ch_t->tsdr->number];
/* remove_at 16 3.2 8 */
  if ((ch_returncode = remove_at_func(DEF(16),DEF(3)DOT(2),
    REF(8).value.integer)) != Normal) goto ch_raise_exception;
/* iadd 16.2 16.2 =(1) */
  if (!chf_iadd(DEF(16)DOT(2),REF(16)DOT(2).value.integer,1))
     goto ch_depletion;
/* block , 2 */
  if((ch_returncode = che_block(QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
/* ord_case 17 16.4 */
  REF(17).value.ord_enum = REF(16)DOT(4).value.variant->info.variant_case;
  REF(17).tsdr = & dr_ord_enumeration;
/* equal 18 17 =(4) */
  REF(18).value.boolean = (REF(17).value.ord_enum == 4);
  REF(18).tsdr = & dr_boolean;
/* move 19 4.2 */
  (*(REF(19).tsdr)->finalize)(REF(19).value,F_DISCARD,sched);
  REF(19) = REF(4)DOT(2);
  REF(4)DOT(2).tsdr = & dr_bottom;
/* equal 20 5 =(78) */
  REF(20).value.boolean = (REF(5).value.enumeration == 78);
  REF(20).tsdr = & dr_boolean;
/* equal 21 5 =(24) */
  REF(21).value.boolean = (REF(5).value.enumeration == 24);
  REF(21).tsdr = & dr_boolean;
/* equal 22 5 =(10) */
  REF(22).value.boolean = (REF(5).value.enumeration == 10);
  REF(22).tsdr = & dr_boolean;
/* equal 23 5 =(36) */
  REF(23).value.boolean = (REF(5).value.enumeration == 36);
  REF(23).tsdr = & dr_boolean;
/* or 24 22 23 */
  REF(24).value.boolean = REF(22).value.boolean|REF(23).value.boolean;
  REF(24).tsdr = & dr_boolean;
/* equal 25 5 =(37) */
  REF(25).value.boolean = (REF(5).value.enumeration == 37);
  REF(25).tsdr = & dr_boolean;
/* or 26 24 25 */
  REF(26).value.boolean = REF(24).value.boolean|REF(25).value.boolean;
  REF(26).tsdr = & dr_boolean;
/* equal . 5 =(6) , 93 */
  if ( REF(5).value.enumeration == 6 ) goto c93;
/* select * 20 * 21 * 26 , {75,81,87} */
  if ( REF(20).value.boolean ) goto c75;
  if ( REF(21).value.boolean ) goto c81;
  if ( REF(26).value.boolean ) goto c87;
/* branch , 99 */
   goto c99;
c75:
/* branch_false 18 , 99 */
  if ( !REF(18).value.boolean ) goto c99;
/* reveal 19 , 4 */
  if (4 != REF(19).value.variant->info.variant_case) goto ch_case_error;
/* copy 27 19.0 */
  if((ch_returncode = (REF(19)DOT(0).tsdr->copy)(& ch_val, REF(19)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(27).tsdr)->finalize)(REF(27).value,F_DISCARD,sched);
  REF(27).value = ch_val;
  REF(27).tsdr = datarepmap[REF(19)DOT(0).tsdr->number];
/* unite 16.4 27 , 3 */
  if ((ch_returncode = che_unite(DEF(16)DOT(4),DEF(27),sched,3)) != Normal)
     goto ch_raise_exception;
/* exit , 3 */
  ch_e = handler_type__exit; ch_val = QUAL(3); goto ch_exception;
c81:
/* branch_false 18 , 99 */
  if ( !REF(18).value.boolean ) goto c99;
/* reveal 19 , 3 */
  if (3 != REF(19).value.variant->info.variant_case) goto ch_case_error;
/* copy 28 19.0 */
  if((ch_returncode = (REF(19)DOT(0).tsdr->copy)(& ch_val, REF(19)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(28).tsdr)->finalize)(REF(28).value,F_DISCARD,sched);
  REF(28).value = ch_val;
  REF(28).tsdr = datarepmap[REF(19)DOT(0).tsdr->number];
/* unite 16.4 28 , 2 */
  if ((ch_returncode = che_unite(DEF(16)DOT(4),DEF(28),sched,2)) != Normal)
     goto ch_raise_exception;
/* exit , 3 */
  ch_e = handler_type__exit; ch_val = QUAL(3); goto ch_exception;
c87:
/* branch_false 18 , 99 */
  if ( !REF(18).value.boolean ) goto c99;
/* reveal 19 , 2 */
  if (2 != REF(19).value.variant->info.variant_case) goto ch_case_error;
/* copy 29 19.0 */
  if((ch_returncode = (REF(19)DOT(0).tsdr->copy)(& ch_val, REF(19)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(29).tsdr)->finalize)(REF(29).value,F_DISCARD,sched);
  REF(29).value = ch_val;
  REF(29).tsdr = datarepmap[REF(19)DOT(0).tsdr->number];
/* unite 16.4 29 , 1 */
  if ((ch_returncode = che_unite(DEF(16)DOT(4),DEF(29),sched,1)) != Normal)
     goto ch_raise_exception;
/* exit , 3 */
  ch_e = handler_type__exit; ch_val = QUAL(3); goto ch_exception;
c93:
/* branch_false 18 , 99 */
  if ( !REF(18).value.boolean ) goto c99;
/* reveal 19 , 1 */
  if (1 != REF(19).value.variant->info.variant_case) goto ch_case_error;
/* copy 30 19.0 */
  if((ch_returncode = (REF(19)DOT(0).tsdr->copy)(& ch_val, REF(19)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(30).tsdr)->finalize)(REF(30).value,F_DISCARD,sched);
  REF(30).value = ch_val;
  REF(30).tsdr = datarepmap[REF(19)DOT(0).tsdr->number];
/* unite 16.4 30 , 0 */
  if ((ch_returncode = che_unite(DEF(16)DOT(4),DEF(30),sched,0)) != Normal)
     goto ch_raise_exception;
/* exit , 3 */
  ch_e = handler_type__exit; ch_val = QUAL(3); goto ch_exception;
c99:
/* unite 16.4 31 , 5 */
  if ((ch_returncode = che_unite(DEF(16)DOT(4),DEF(31),sched,5)) != Normal)
     goto ch_raise_exception;
/* endblock */
  che_endblock(sched);
/* branch , 105 */
   goto c105;
c105:
/* insert_at 3.2 16 8 */
  ch_i = REF(8).value.integer;
  if (ch_i < 0 || REF(3)DOT(2).value.table->size < ch_i) goto ch_range_error;
  if ((ch_returncode = insertfunc(DEF(3)DOT(2),DEF(16),TRUE, ch_i)) != Normal)
     goto ch_raise_exception;
c106:
/* discard 19 */
  (*(REF(19).tsdr)->finalize)(REF(19).value,F_DISCARD,sched);
  REF(19).tsdr = & dr_bottom;
/* discard 4.2 */
  (*(REF(4)DOT(2).tsdr)->finalize)(REF(4)DOT(2).value,F_DISCARD,sched);
  REF(4)DOT(2).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);
c111:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
