#include "chdecl.h"
void CH_codegen_cgclause(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 5: goto c10;
    case 3: goto c10;
    case 4: goto cb13;
    case 6: goto c15;
    case 7: goto c19;
    case 8: goto c22;
    case 11: goto c29;
    case 9: goto c29;
    case 10: goto cb31;
    case 12: goto c33;
    case 13: goto c37;
    case 14: goto cb38;
    case 15: goto c39;
    case 18: goto c46;
    case 16: goto c46;
    case 17: goto cb48;
    case 19: goto c50;
    case 20: goto c55;
    case 21: goto c59;
    case 22: goto c71;
    case 23: goto c77;  }
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:
/* new_record 4 , 2 */
  if ((ch_val.record = new_record(2)) == nil) goto ch_depletion;
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).value = ch_val; REF(4).tsdr = & dr_record;
/* copy 4.0 3.0 */
  if((ch_returncode = (REF(3)DOT(0).tsdr->copy)(& ch_val, REF(3)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(4)DOT(0).tsdr)->finalize)(REF(4)DOT(0).value,F_DISCARD,sched);
  REF(4)DOT(0).value = ch_val;
  REF(4)DOT(0).tsdr = datarepmap[REF(3)DOT(0).tsdr->number];
/* new_table 5 , 1 */
  if ((ch_returncode = che_new_table(DEF(5),QUAL(1),sched)) != Normal) 
     goto ch_raise_exception;
/* block , 2 */
  if((ch_returncode = che_block(QUAL(2),sched)) != Normal)
     goto ch_raise_exception;
/* block , 3 */
  if((ch_returncode = che_block(QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
/* find 6 3.1.4.1.3 3.0 , 0 */
  if (findfunc(DEF(6),DEF(3)DOT(1)DOT(4)DOT(1)DOT(3),(
          arguments[0] = DEF(3)DOT(0),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* copy 7 6.1 */
  if((ch_returncode = cp_table(& ch_val, REF(6)DOT(1).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_table;
/* initget 8 7 , 0,0 */
  (*(REF(8).tsdr)->finalize)(REF(8).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(8),DEF(7),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c14:
c10:
/* get_or_goto 8 7 , 15 */
  if ((ch_returncode = get_selected_object(DEF(8),DEF(7),sched)) != Normal)
     goto c15;
/* discard 4.1 */
  (*(REF(4)DOT(1).tsdr)->finalize)(REF(4)DOT(1).value,F_DISCARD,sched);
  REF(4)DOT(1).tsdr = & dr_bottom;
/* copy 4.1 8.0 */
  if((ch_returncode = (REF(8)DOT(0).tsdr->copy)(& ch_val, REF(8)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(4)DOT(1).tsdr)->finalize)(REF(4)DOT(1).value,F_DISCARD,sched);
  REF(4)DOT(1).value = ch_val;
  REF(4)DOT(1).tsdr = datarepmap[REF(8)DOT(0).tsdr->number];
  current->ip = 4;
cb13:
/* call 3.1.3.3 8 5 3.1 , 4 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(1)DOT(3)DOT(3),
          arguments[1] = DEF(8),
          arguments[2] = DEF(5),
          arguments[3] = DEF(3)DOT(1),
          arguments[3+1] = nil,& arguments[0]),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c15:
/* endget 8 7 */
  end_selector(DEF(8),DEF(7),sched,GET);
/* discard 7 */
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c19:
/* find 9 3.1.4.0.1.1 3.0 , 0 */
  if (findfunc(DEF(9),DEF(3)DOT(1)DOT(4)DOT(0)DOT(1)DOT(1),(
          arguments[0] = DEF(3)DOT(0),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* copy 10 9.1 */
  if((ch_returncode = cp_table(& ch_val, REF(9)DOT(1).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  REF(10).value = ch_val;
  REF(10).tsdr = & dr_table;
/* initget 11 10 , 0,0 */
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(11),DEF(10),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c22:
/* get_or_goto 11 10 , 55 */
  if ((ch_returncode = get_selected_object(DEF(11),DEF(10),sched)) != Normal)
     goto c55;
/* discard 4.1 */
  (*(REF(4)DOT(1).tsdr)->finalize)(REF(4)DOT(1).value,F_DISCARD,sched);
  REF(4)DOT(1).tsdr = & dr_bottom;
/* copy 4.1 11.0 */
  if((ch_returncode = (REF(11)DOT(0).tsdr->copy)(& ch_val, REF(11)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(4)DOT(1).tsdr)->finalize)(REF(4)DOT(1).value,F_DISCARD,sched);
  REF(4)DOT(1).value = ch_val;
  REF(4)DOT(1).tsdr = datarepmap[REF(11)DOT(0).tsdr->number];
/* block , 5 */
  if((ch_returncode = che_block(QUAL(5),sched)) != Normal)
     goto ch_raise_exception;
/* find 12 3.1.4.1.1 4 , 0 */
  if (findfunc(DEF(12),DEF(3)DOT(1)DOT(4)DOT(1)DOT(1),(
          arguments[0] = DEF(4),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* copy 13 12.1 */
  if((ch_returncode = cp_table(& ch_val, REF(12)DOT(1).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(13).tsdr)->finalize)(REF(13).value,F_DISCARD,sched);
  REF(13).value = ch_val;
  REF(13).tsdr = & dr_table;
/* initget 14 13 , 0,0 */
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(14),DEF(13),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c32:
c29:
/* get_or_goto 14 13 , 33 */
  if ((ch_returncode = get_selected_object(DEF(14),DEF(13),sched)) != Normal)
     goto c33;
/* copy 4.1 14.0 */
  if((ch_returncode = (REF(14)DOT(0).tsdr->copy)(& ch_val, REF(14)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(4)DOT(1).tsdr)->finalize)(REF(4)DOT(1).value,F_DISCARD,sched);
  REF(4)DOT(1).value = ch_val;
  REF(4)DOT(1).tsdr = datarepmap[REF(14)DOT(0).tsdr->number];
  current->ip = 10;
cb31:
/* call 3.1.3.3 14 5 3.1 , 4 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(1)DOT(3)DOT(3),
          arguments[1] = DEF(14),
          arguments[2] = DEF(5),
          arguments[3] = DEF(3)DOT(1),
          arguments[3+1] = nil,& arguments[0]),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c33:
/* endget 14 13 */
  end_selector(DEF(14),DEF(13),sched,GET);
/* discard 13 */
  (*(REF(13).tsdr)->finalize)(REF(13).value,F_DISCARD,sched);
  REF(13).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c37:
/* copy 4.1 11.0 */
  if((ch_returncode = (REF(11)DOT(0).tsdr->copy)(& ch_val, REF(11)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(4)DOT(1).tsdr)->finalize)(REF(4)DOT(1).value,F_DISCARD,sched);
  REF(4)DOT(1).value = ch_val;
  REF(4)DOT(1).tsdr = datarepmap[REF(11)DOT(0).tsdr->number];
  current->ip = 14;
cb38:
/* call 3.1.3.3 11 5 3.1 , 4 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(1)DOT(3)DOT(3),
          arguments[1] = DEF(11),
          arguments[2] = DEF(5),
          arguments[3] = DEF(3)DOT(1),
          arguments[3+1] = nil,& arguments[0]),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c39:
/* find 15 3.1.4.0.1.0 3.1.4.0.1.2 , 0 */
  if (findfunc(DEF(15),DEF(3)DOT(1)DOT(4)DOT(0)DOT(1)DOT(0),(
          arguments[0] = DEF(3)DOT(1)DOT(4)DOT(0)DOT(1)DOT(2),
            & arguments[0]),sched,0) == FAILURE) goto ch_notfound;
/* equal . 15.2 3.0 , 22 */
  if ( (REF(15)DOT(2).tsdr->equal)(REF(15)DOT(2).value,REF(3)DOT(0).value) )
     goto c22;
/* block , 6 */
  if((ch_returncode = che_block(QUAL(6),sched)) != Normal)
     goto ch_raise_exception;
/* find 16 3.1.4.1.2 4 , 0 */
  if (findfunc(DEF(16),DEF(3)DOT(1)DOT(4)DOT(1)DOT(2),(
          arguments[0] = DEF(4),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* copy 17 16.1 */
  if((ch_returncode = cp_table(& ch_val, REF(16)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 = & dr_table;
/* initget 18 17 , 0,0 */
  (*(REF(18).tsdr)->finalize)(REF(18).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(18),DEF(17),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c49:
c46:
/* get_or_goto 18 17 , 50 */
  if ((ch_returncode = get_selected_object(DEF(18),DEF(17),sched)) != Normal)
     goto c50;
/* copy 4.1 18.0 */
  if((ch_returncode = (REF(18)DOT(0).tsdr->copy)(& ch_val, REF(18)DOT(0).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(4)DOT(1).tsdr)->finalize)(REF(4)DOT(1).value,F_DISCARD,sched);
  REF(4)DOT(1).value = ch_val;
  REF(4)DOT(1).tsdr = datarepmap[REF(18)DOT(0).tsdr->number];
  current->ip = 17;
cb48:
/* call 3.1.3.3 18 5 3.1 , 4 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(3)DOT(1)DOT(3)DOT(3),
          arguments[1] = DEF(18),
          arguments[2] = DEF(5),
          arguments[3] = DEF(3)DOT(1),
          arguments[3+1] = nil,& arguments[0]),QUAL(4),sched)) != Normal)
     goto ch_raise_exception;
  return;
c50:
/* endget 18 17 */
  end_selector(DEF(18),DEF(17),sched,GET);
/* discard 17 */
  (*(REF(17).tsdr)->finalize)(REF(17).value,F_DISCARD,sched);
  REF(17).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
/* branch , 22 */
   goto c22;
c55:
/* endget 11 10 */
  end_selector(DEF(11),DEF(10),sched,GET);
/* discard 10 */
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  REF(10).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
/* branch , 71 */
   goto c71;
c59:
/* chs_lit 19 , "cgclause: Problem translating statement; file/line/column:" */
  if( !chs_lit(DEF(19),
    "cgclause: Problem translating statement; file/line/column:") )
     goto ch_depletion;
/* print 19 */
  re_print(stderr, 0, DEF(19)); fflush(stderr);
/* discard 19 */
  (*(REF(19).tsdr)->finalize)(REF(19).value,F_DISCARD,sched);
  REF(19).tsdr = & dr_bottom;
/* chs_lit 20 , "Position Map" */
  if( !chs_lit(DEF(20),"Position Map") ) goto ch_depletion;
/* find 21 3.1.0.2 20 , 0 */
  if (findfunc(DEF(21),DEF(3)DOT(1)DOT(0)DOT(2),(
          arguments[0] = DEF(20),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* copy 22 21.1 */
  if((ch_returncode = cp_polymorph(& ch_val, REF(21)DOT(1).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(22).tsdr)->finalize)(REF(22).value,F_DISCARD,sched);
  REF(22).value = ch_val;
  REF(22).tsdr = & dr_polymorph;
/* unwrap 23 22 , 7 */
  if ((ch_returncode = che_unwrap(DEF(23),DEF(22),QUAL(7),sched)) != Normal)
     goto ch_raise_exception;
/* copy 24 3.1.4.0.0 */
  if((ch_returncode = (REF(3)DOT(1)DOT(4)DOT(0)DOT(0).tsdr->copy)(& ch_val, 
    REF(3)DOT(1)DOT(4)DOT(0)DOT(0).value)) != Normal) goto ch_raise_exception;
  (*(REF(24).tsdr)->finalize)(REF(24).value,F_DISCARD,sched);
  REF(24).value = ch_val;
  REF(24).tsdr = datarepmap[REF(3)DOT(1)DOT(4)DOT(0)DOT(0).tsdr->number];
/* unite 25 24 , 0 */
  if ((ch_returncode = che_unite(DEF(25),DEF(24),sched,0)) != Normal)
     goto ch_raise_exception;
/* find 26 23 25 , 0 */
  if (findfunc(DEF(26),DEF(23),(
          arguments[0] = DEF(25),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* find 27 26.1 4 , 0 */
  if (findfunc(DEF(27),DEF(26)DOT(1),(
          arguments[0] = DEF(4),& arguments[0]),sched,0) == FAILURE)
             goto ch_notfound;
/* print 27.1 */
  re_print(stderr, 0, DEF(27)DOT(1)); fflush(stderr);
c71:
/* discard 23 */
  (*(REF(23).tsdr)->finalize)(REF(23).value,F_DISCARD,sched);
  REF(23).tsdr = & dr_bottom;
/* discard 25 */
  (*(REF(25).tsdr)->finalize)(REF(25).value,F_DISCARD,sched);
  REF(25).tsdr = & dr_bottom;
/* discard 4.1 */
  (*(REF(4)DOT(1).tsdr)->finalize)(REF(4)DOT(1).value,F_DISCARD,sched);
  REF(4)DOT(1).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);
c77:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
