#include "chdecl.h"
void CH_typestate_pokill(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 c3;
    case 4: goto c14;
    case 5: goto c35;
    case 6: goto c37;
    case 7: goto c46;
    case 8: goto c56;
    case 9: goto c58;
    case 10: goto c60;
    case 11: goto c64;
    case 12: goto c70;  }
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:
/* initget 4 3.5.2 , 0,0 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(4),DEF(3)DOT(5)DOT(2),nil,sched,GET,
    0,0)) != Normal) goto ch_raise_exception;
c3:
/* get_or_err 4 3.5.2 */
  if ((ch_returncode = get_selected_object(DEF(4),DEF(3)DOT(5)DOT(2)
    ,sched)) != Normal) goto ch_raise_exception;
/* lookup_at 5 3.7 =(0) */
  if ( !((ch_t = REF(3)DOT(7).value.table)->size) ) goto ch_notfound;
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(5).value,0);
  REF(5).tsdr = qdatarepmap[ch_t->tsdr->number];
/* copy 6 5 */
  REF(6) = REF(5);
/* position 7 4 */
  ch_frame = get_selector_frame(DEF(4),sched);
  ch_t = ch_frame->inspectee->value.table;
  REF(7).value.integer = ch_frame->rmvcount +
    (*(ch_t->tbls[ORDER_TBL].des->position_of))(ch_t,ORDER_TBL,ch_frame->pos);
  REF(7).tsdr = &dr_integer;
/* notequal . 6 7 , 3 */
  if ( REF(6).value.integer != REF(7).value.integer ) goto c3;
/* size 8 4.1 */
  REF(8).value.integer = REF(4)DOT(1).value.table->size;
  REF(8).tsdr = & dr_integer;
/* new_table 9 , 1 */
  if ((ch_returncode = che_new_table(DEF(9),QUAL(1),sched)) != Normal) 
     goto ch_raise_exception;
/* initget 10 3.6 , 0,0 */
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(10),DEF(3)DOT(6),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c14:
/* get_or_goto 10 3.6 , 64 */
  if ((ch_returncode = get_selected_object(DEF(10),DEF(3)DOT(6)
    ,sched)) != Normal) goto c64;
/* block , 2 */
  if((ch_returncode = che_block(QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
/* case 11 10.0 */
  REF(11).value.enumeration = REF(10)DOT(0).value.variant->info.variant_case;
  REF(11).tsdr = & dr_enumeration;
/* equal . 11 =(4) , 25 */
  if ( REF(11).value.enumeration == 4 ) goto c25;
/* equal . 11 =(3) , 27 */
  if ( REF(11).value.enumeration == 3 ) goto c27;
/* equal . 11 =(2) , 29 */
  if ( REF(11).value.enumeration == 2 ) goto c29;
/* branch , 31 */
   goto c31;
c25:
/* exit , 3 */
  ch_e = handler_type__exit; ch_val = QUAL(3); goto ch_exception;
c27:
/* exit , 3 */
  ch_e = handler_type__exit; ch_val = QUAL(3); goto ch_exception;
c29:
/* exit , 3 */
  ch_e = handler_type__exit; ch_val = QUAL(3); goto ch_exception;
c31:
/* boolean 12 , FALSE */
  REF(12).value.boolean = FALSE;
  REF(12).tsdr = & dr_boolean;
/* endblock */
  che_endblock(sched);
/* branch , 60 */
   goto c60;
c35:
/* boolean 13 , FALSE */
  REF(13).value.boolean = FALSE;
  REF(13).tsdr = & dr_boolean;
/* initget 14 10.1 , 0,0 */
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(14),DEF(10)DOT(1),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c37:
/* get_or_goto 14 10.1 , 58 */
  if ((ch_returncode = get_selected_object(DEF(14),DEF(10)DOT(1)
    ,sched)) != Normal) goto c58;
/* equal 15 4.0 14.0 */
  REF(15).value.boolean = ((REF(4)DOT(0).tsdr->equal)(REF(4)DOT(0).value,
    REF(14)DOT(0).value));
  REF(15).tsdr = & dr_boolean;
/* size 16 14.1 */
  REF(16).value.integer = REF(14)DOT(1).value.table->size;
  REF(16).tsdr = & dr_integer;
/* ile 17 16 8 */
  REF(17).value.boolean = (REF(16).value.integer <= REF(8).value.integer);
/* and 18 15 17 */
  REF(18).value.boolean = REF(15).value.boolean&REF(17).value.boolean;
  REF(18).tsdr = & dr_boolean;
/* branch_false 18 , 56 */
  if ( !REF(18).value.boolean ) goto c56;
/* boolean 19 , TRUE */
  REF(19).value.boolean = TRUE;
  REF(19).tsdr = & dr_boolean;
/* initget 20 14.1 , 0,0 */
  (*(REF(20).tsdr)->finalize)(REF(20).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(20),DEF(14)DOT(1),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c46:
/* get_or_goto 20 14.1 , 54 */
  if ((ch_returncode = get_selected_object(DEF(20),DEF(14)DOT(1)
    ,sched)) != Normal) goto c54;
/* position 21 20 */
  ch_frame = get_selector_frame(DEF(20),sched);
  ch_t = ch_frame->inspectee->value.table;
  REF(21).value.integer = ch_frame->rmvcount +
    (*(ch_t->tbls[ORDER_TBL].des->position_of))(ch_t,ORDER_TBL,ch_frame->pos);
  REF(21).tsdr = &dr_integer;
/* lookup_at 22 4.1 21 */
  if((ch_i = REF(21).value.integer) < 0 || ch_i >= (ch_t = REF(4)DOT(1).value
    .table)->size) goto ch_notfound;
  (*(REF(22).tsdr)->finalize)(REF(22).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(22).value,ch_i);
  REF(22).tsdr = qdatarepmap[ch_t->tsdr->number];
/* copy 23 22 */
  if((ch_returncode = (REF(22).tsdr->copy)(& ch_val, REF(22).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(23).tsdr)->finalize)(REF(23).value,F_DISCARD,sched);
  REF(23).value = ch_val;
  REF(23).tsdr = datarepmap[REF(22).tsdr->number];
/* equal 24 20 23 */
  REF(24).value.boolean = ((REF(20).tsdr->equal)(REF(20).value,REF(23).value)
    );
  REF(24).tsdr = & dr_boolean;
/* discard 23 */
  (*(REF(23).tsdr)->finalize)(REF(23).value,F_DISCARD,sched);
  REF(23).tsdr = & dr_bottom;
/* branch_true 24 , 46 */
  if ( REF(24).value.boolean ) goto c46;
/* boolean 19 , FALSE */
  REF(19).value.boolean = FALSE;
  REF(19).tsdr = & dr_boolean;
c54:
/* endget 20 14.1 */
  end_selector(DEF(20),DEF(14)DOT(1),sched,GET);
/* move 18 19 */
  REF(18) = REF(19);
  REF(19).tsdr = & dr_bottom;
c56:
/* branch_false 18 , 37 */
  if ( !REF(18).value.boolean ) goto c37;
/* boolean 13 , TRUE */
  REF(13).value.boolean = TRUE;
  REF(13).tsdr = & dr_boolean;
c58:
/* endget 14 10.1 */
  end_selector(DEF(14),DEF(10)DOT(1),sched,GET);
/* move 12 13 */
  REF(12) = REF(13);
  REF(13).tsdr = & dr_bottom;
c60:
/* branch_false 12 , 14 */
  if ( !REF(12).value.boolean ) goto c14;
/* copy 25 10 */
  if((ch_returncode = (REF(10).tsdr->copy)(& ch_val, REF(10).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(25).tsdr)->finalize)(REF(25).value,F_DISCARD,sched);
  REF(25).value = ch_val;
  REF(25).tsdr = datarepmap[REF(10).tsdr->number];
/* insert 9 25 */
  if ((ch_returncode = insertfunc(DEF(9),DEF(25),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* branch , 14 */
   goto c14;
c64:
/* endget 10 3.6 */
  end_selector(DEF(10),DEF(3)DOT(6),sched,GET);
/* merge 3.8.1 9 */
  if ((ch_returncode = mergefunc(DEF(3)DOT(8)DOT(1),DEF(9)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
/* endget 4 3.5.2 */
  end_selector(DEF(4),DEF(3)DOT(5)DOT(2),sched,GET);
/* 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);
c70:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
