#include "chdecl.h"
void CH_codegen_cgatoi(current, sched, cop)
#define ARGUMENTS 5
#include "chhead.h"
select: switch (SELECTOR) {
    case 0: goto c0;
    case 1: goto cb1;
    case 2: goto c2;
    case 3: goto c33;
    case 4: goto c48;  }
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:
/* ilit 3.1 , 0 */
  REF(3)DOT(1).value.integer = 0;
  REF(3)DOT(1).tsdr = & dr_integer;
/* copy 4 3.0 */
  if((ch_returncode = cp_table(& ch_val, REF(3)DOT(0).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(4).tsdr)->finalize)(REF(4).value,F_DISCARD,sched);
  REF(4).value = ch_val;
  REF(4).tsdr = & dr_table;
/* privatize 4 */
  if (REF(4).value.table->refcount != 1)
    if ((ch_returncode = doCopyOnWrite(DEF(4))) != Normal)
       goto ch_raise_exception;
/* lookup_at 5 4 =(0) */
  if ( !((ch_t = REF(4).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];
/* remove_at 6 4 =(0) */
  if ((ch_returncode = remove_at_func(DEF(6),DEF(4),0)) != Normal)
     goto ch_raise_exception;
/* equal . 6 =(45) , 20 */
  if ( REF(6).value.ord_enum == 45 ) goto c20;
/* equal . 6 =(43) , 23 */
  if ( REF(6).value.ord_enum == 43 ) goto c23;
/* branch , 26 */
   goto c26;
c20:
/* ilit 7 , -1 */
  REF(7).value.integer = -1;
  REF(7).tsdr = & dr_integer;
/* branch , 31 */
   goto c31;
c23:
/* ilit 7 , 1 */
  REF(7).value.integer = 1;
  REF(7).tsdr = & dr_integer;
/* branch , 31 */
   goto c31;
c26:
/* ilit 7 , 1 */
  REF(7).value.integer = 1;
  REF(7).tsdr = & dr_integer;
/* oecvt_int 8 6 */
  REF(8).value.integer = REF(6).value.ord_enum;
  REF(8).tsdr = & dr_integer;
/* isubtract 3.1 8 =(48) */
  if (!chf_isubtract(DEF(3)DOT(1),REF(8).value.integer,48)) goto ch_depletion;
c31:
/* copy 9 4 */
  if((ch_returncode = cp_table(& ch_val, REF(4).value)) != Normal)
     goto ch_raise_exception;
  (*(REF(9).tsdr)->finalize)(REF(9).value,F_DISCARD,sched);
  REF(9).value = ch_val;
  REF(9).tsdr = & dr_table;
/* initget 10 9 , 0,0 */
  (*(REF(10).tsdr)->finalize)(REF(10).value,F_DISCARD,sched);
  if ((ch_returncode = init_selector(DEF(10),DEF(9),nil,sched,GET,0,0
    )) != Normal) goto ch_raise_exception;
c33:
/* get_or_goto 10 9 , 41 */
  if ((ch_returncode = get_selected_object(DEF(10),DEF(9),sched)) != Normal)
     goto c41;
/* imultiply 3.1 3.1 =(10) */
  if (!chf_imultiply(DEF(3)DOT(1),REF(3)DOT(1).value.integer,10))
     goto ch_depletion;
/* oecvt_int 11 10 */
  REF(11).value.integer = REF(10).value.ord_enum;
  REF(11).tsdr = & dr_integer;
/* isubtract 12 11 =(48) */
  if (!chf_isubtract(DEF(12),REF(11).value.integer,48)) goto ch_depletion;
/* iadd 3.1 3.1 12 */
  if (!chf_iadd(DEF(3)DOT(1),REF(3)DOT(1).value.integer,REF(12).value.integer
    )) goto ch_depletion;
/* branch , 33 */
   goto c33;
c41:
/* endget 10 9 */
  end_selector(DEF(10),DEF(9),sched,GET);
/* discard 9 */
  (*(REF(9).tsdr)->finalize)(REF(9).value,F_DISCARD,sched);
  REF(9).tsdr = & dr_bottom;
/* imultiply 3.1 3.1 7 */
  if (!chf_imultiply(DEF(3)DOT(1),REF(3)DOT(1).value.integer,
    REF(7).value.integer)) goto ch_depletion;
/* 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);
c48:
/* endprocess */
  che_endprocess(sched); return;
#include "chtail.h"
