#include "chdecl.h"
void CH_codegen_cgexists(current, sched, cop)
#define ARGUMENTS 10
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb1;
    case 2: goto c2;
    case 3: goto cb6;
    case 4: goto c7;
    case 5: goto cb16;
    case 6: goto c17;
    case 7: goto cb18;
    case 8: goto c19;
    case 9: goto cb20;
    case 10: goto c21;
    case 11: goto cb25;
    case 12: goto c27;
    case 13: goto c30;  }
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:
/* reveal 3.0.3 , 14 */
  if (14 != REF(3)DOT(0)DOT(3).value.variant->info.variant_case)
     goto ch_case_error;
/* lookup_at 4 3.0.2 =(0) */
  if ( !((ch_t = REF(3)DOT(0)DOT(2).value.table)->size) ) goto ch_notfound;
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(4).value,0);
  REF(4).tsdr = qdatarepmap[ch_t->tsdr->number];
/* copy 5 4 */
  if((ch_returncode = (REF(4).tsdr->copy)(& ch_val, REF(4).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(5).tsdr)->finalize)(REF(5).value,F_DISCARD,sched);
  REF(5).value = ch_val;
  REF(5).tsdr = datarepmap[REF(4).tsdr->number];
  current->ip = 3;
cb6:
/* call 3.2.4.4 5 6 , 1 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(4)DOT(4),
          arguments[1] = DEF(5),
          arguments[2] = DEF(6),
          arguments[2+1] = nil,& arguments[0]),QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
  return;
c7:
/* noop */
  
/* copy 7 3.2.5.0 */
  if((ch_returncode = (REF(3)DOT(2)DOT(5)DOT(0).tsdr->copy)(& ch_val, 
    REF(3)DOT(2)DOT(5)DOT(0).value)) != Normal) goto ch_raise_exception;
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).value = ch_val;
  REF(7).tsdr = datarepmap[REF(3)DOT(2)DOT(5)DOT(0).tsdr->number];
/* copy 8 6 */
  if((ch_returncode = (REF(6).tsdr->copy)(& ch_val, REF(6).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  REF(8).value = ch_val;
  REF(8).tsdr = datarepmap[REF(6).tsdr->number];
/* insert 7.1 8 */
  if ((ch_returncode = insertfunc(DEF(7)DOT(1),DEF(8),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* insert 3.2.4.3.1 7 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(3)DOT(1),DEF(7)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
/* lookup_at 9 3.0.2 =(1) */
  if (1 >= (ch_t = REF(3)DOT(0)DOT(2).value.table)->size) goto ch_notfound;
  (*(REF(9).tsdr)->finalize)(REF(9).value,F_DISCARD,sched);
  (*(ch_t->tbls[ORDER_TBL].des->lookup_at))
    (ch_t, ORDER_TBL, & REF(9).value,1);
  REF(9).tsdr = qdatarepmap[ch_t->tsdr->number];
/* copy 10 9 */
  if((ch_returncode = (REF(9).tsdr->copy)(& ch_val, REF(9).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  REF(10).value = ch_val;
  REF(10).tsdr = datarepmap[REF(9).tsdr->number];
  current->ip = 5;
cb16:
/* call 3.2.4.4 10 11 , 1 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(4)DOT(4),
          arguments[1] = DEF(10),
          arguments[2] = DEF(11),
          arguments[2+1] = nil,& arguments[0]),QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
  return;
c17:
/* move 12 11 */
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12) = REF(11);
  REF(11).tsdr = & dr_bottom;
  current->ip = 7;
cb18:
/* call 3.2.4.6 10 13 , 2 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(4)DOT(6),
          arguments[1] = DEF(10),
          arguments[2] = DEF(13),
          arguments[2+1] = nil,& arguments[0]),QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
  return;
c19:
/* enum_lit 14 , 1 */
  REF(14).value.enumeration = 1;
  REF(14).tsdr = & dr_enumeration;
  current->ip = 9;
cb20:
/* call 3.2.3.10 3.0.3.0 3.2 13 14 15 12 16 , 3 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(2)DOT(3)DOT(10),
          arguments[1] = DEF(3)DOT(0)DOT(3)DOT(0),
          arguments[2] = DEF(3)DOT(2),
          arguments[3] = DEF(13),
          arguments[4] = DEF(14),
          arguments[5] = DEF(15),
          arguments[6] = DEF(12),
          arguments[7] = DEF(16),
          arguments[7+1] = nil,& arguments[0]),QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
  return;
c21:
/* noop */
  
/* copy 17 3.2.5.1 */
  if((ch_returncode = (REF(3)DOT(2)DOT(5)DOT(1).tsdr->copy)(& ch_val, 
    REF(3)DOT(2)DOT(5)DOT(1).value)) != Normal) goto ch_raise_exception;
  (*(REF(17).tsdr)->finalize)(REF(17).value,F_DISCARD,sched);
  REF(17).value = ch_val;
  REF(17).tsdr = datarepmap[REF(3)DOT(2)DOT(5)DOT(1).tsdr->number];
/* insert 17.1 6 */
  if ((ch_returncode = insertfunc(DEF(17)DOT(1),DEF(6),FALSE,0)) != Normal)
     goto ch_raise_exception;
/* insert 3.2.4.3.1 17 */
  if ((ch_returncode = insertfunc(DEF(3)DOT(2)DOT(4)DOT(3)DOT(1),DEF(17)
    ,FALSE,0)) != Normal) goto ch_raise_exception;
  current->ip = 11;
cb25:
/* call 16 3.2 , 4 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(16),
          arguments[1] = DEF(3)DOT(2),
          arguments[1+1] = nil,& arguments[0]),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c27:
/* 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);
c30:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
