#include "chdecl.h"
void CH_chcode_chtransform(current, sched, cop)
#define ARGUMENTS 10
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb2;
    case 2: goto c3;
    case 3: goto cb10;
    case 4: goto c11;
    case 5: goto cb14;
    case 6: goto c15;
    case 7: goto cb20;
    case 8: goto c21;
    case 9: goto c25;
    case 10: goto c26;
    case 11: goto c33;  }
c0:
/* block , 0 */
  if((ch_returncode = che_block(QUAL(0),sched)) != Normal)
     goto ch_raise_exception;
/* block , 1 */
  if((ch_returncode = che_block(QUAL(1),sched)) != Normal)
     goto ch_raise_exception;
  current->ip = 1;
cb2:
/* receive 3 0 */
  if ((ch_returncode = che_receive(DEF(3),DEF(0),sched)) != Normal)
     goto ch_raise_exception;
  return;
c3:
/* prog_lit 4 , 2 */
  if ((ch_returncode = che_prog_lit(DEF(4),QUAL(2),sched)) != Normal) 
     goto ch_raise_exception;
/* procedure 5 4 , 3 */
  if ((ch_returncode = che_procedure(DEF(5),DEF(4),QUAL(3),sched)) != Normal)
     goto ch_raise_exception;
/* discard 4 */
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).tsdr = & dr_bottom;
/* move 6 5 */
  (*(REF(6).tsdr)->finalize)(REF(6).value,F_DISCARD,sched);
  REF(6) = REF(5);
  REF(5).tsdr = & dr_bottom;
/* prog_lit 7 , 4 */
  if ((ch_returncode = che_prog_lit(DEF(7),QUAL(4),sched)) != Normal) 
     goto ch_raise_exception;
/* create 8 7 , 5 */
  if ((ch_returncode = che_create(DEF(8),DEF(7),QUAL(5),sched)) != Normal)
     goto ch_raise_exception;
/* discard 7 */
  (*(REF(7).tsdr)->finalize)(REF(7).value,F_DISCARD,sched);
  REF(7).tsdr = & dr_bottom;
  current->ip = 3;
cb10:
/* call 8 3.0 3.1.3 9 10 6 , 6 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(8),
          arguments[1] = DEF(3)DOT(0),
          arguments[2] = DEF(3)DOT(1)DOT(3),
          arguments[3] = DEF(9),
          arguments[4] = DEF(10),
          arguments[5] = DEF(6),
          arguments[5+1] = nil,& arguments[0]),QUAL(6),sched)) != Normal)
     goto ch_raise_exception;
  return;
c11:
/* prog_lit 11 , 7 */
  if ((ch_returncode = che_prog_lit(DEF(11),QUAL(7),sched)) != Normal) 
     goto ch_raise_exception;
/* create 12 11 , 8 */
  if ((ch_returncode = che_create(DEF(12),DEF(11),QUAL(8),sched)) != Normal)
     goto ch_raise_exception;
/* discard 11 */
  (*(REF(11).tsdr)->finalize)(REF(11).value,F_DISCARD,sched);
  REF(11).tsdr = & dr_bottom;
  current->ip = 5;
cb14:
/* call 12 3.0 13 9 10 6 , 9 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(12),
          arguments[1] = DEF(3)DOT(0),
          arguments[2] = DEF(13),
          arguments[3] = DEF(9),
          arguments[4] = DEF(10),
          arguments[5] = DEF(6),
          arguments[5+1] = nil,& arguments[0]),QUAL(9),sched)) != Normal)
     goto ch_raise_exception;
  return;
c15:
/* copy 14 3.1 */
  if((ch_returncode = (REF(3)DOT(1).tsdr->copy)(& ch_val, REF(3)DOT(1).value
    )) != Normal) goto ch_raise_exception;
  (*(REF(14).tsdr)->finalize)(REF(14).value,F_DISCARD,sched);
  REF(14).value = ch_val;
  REF(14).tsdr = datarepmap[REF(3)DOT(1).tsdr->number];
/* new_table 14.3 , 10 */
  if ((ch_returncode = che_new_table(DEF(14)DOT(3),QUAL(10)
    ,sched)) != Normal)  goto ch_raise_exception;
/* prog_lit 15 , 11 */
  if ((ch_returncode = che_prog_lit(DEF(15),QUAL(11),sched)) != Normal) 
     goto ch_raise_exception;
/* create 16 15 , 12 */
  if ((ch_returncode = che_create(DEF(16),DEF(15),QUAL(12),sched)) != Normal)
     goto ch_raise_exception;
/* discard 15 */
  (*(REF(15).tsdr)->finalize)(REF(15).value,F_DISCARD,sched);
  REF(15).tsdr = & dr_bottom;
  current->ip = 7;
cb20:
/* call 16 3.0 13 9 10 6 14 3.2 , 13 */
  if ((ch_returncode = che_call((
          arguments[0] = DEF(16),
          arguments[1] = DEF(3)DOT(0),
          arguments[2] = DEF(13),
          arguments[3] = DEF(9),
          arguments[4] = DEF(10),
          arguments[5] = DEF(6),
          arguments[6] = DEF(14),
          arguments[7] = DEF(3)DOT(2),
          arguments[7+1] = nil,& arguments[0]),QUAL(13),sched)) != Normal)
     goto ch_raise_exception;
  return;
c21:
/* move 3.1 14 */
  (*(REF(3)DOT(1).tsdr)->finalize)(REF(3)DOT(1).value,F_DISCARD,sched);
  REF(3)DOT(1) = REF(14);
  REF(14).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);
/* branch , 26 */
   goto c26;
c25:
/* return_exception 3 , 14 */
  if (ch_caller = do_return(REF(3).value)) {
    raise_user(QUAL(14),ch_caller); 
    sched->wakeup_proc(sched,ch_caller);}
  else rem_return_exception(DEF(3),QUAL(14));
  REF(3).tsdr = & dr_bottom;
c26:
/* discard 9 */
  (*(REF(9).tsdr)->finalize)(REF(9).value,F_DISCARD,sched);
  REF(9).tsdr = & dr_bottom;
/* discard 10 */
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  REF(10).tsdr = & dr_bottom;
/* discard 13 */
  (*(REF(13).tsdr)->finalize)(REF(13).value,F_DISCARD,sched);
  REF(13).tsdr = & dr_bottom;
/* discard 12 */
  (*(REF(12).tsdr)->finalize)(REF(12).value,F_DISCARD,sched);
  REF(12).tsdr = & dr_bottom;
/* discard 16 */
  (*(REF(16).tsdr)->finalize)(REF(16).value,F_DISCARD,sched);
  REF(16).tsdr = & dr_bottom;
/* endblock */
  che_endblock(sched);
c33:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
