
/* This file was automatically generated by pclu.*/

#include "pclu_err.h"
#include "pclu_sys.h"


extern errcode exprOPget_abs();
extern errcode c_envOPget_null_type();
extern errcode c_envOPget_bool_type();
extern errcode c_envOPget_int_type();
extern errcode c_envOPget_real_type();
extern errcode c_envOPget_char_type();
extern errcode c_envOPget_str_type();
extern errcode c_idn();
extern errcode c_infix();
extern errcode c_xsugar();
extern errcode sequenceOPe2s();
extern errcode c_sugar();
extern errcode stringOPconcat();
extern errcode recordOPget_2();
extern errcode recordOPget_1();
extern errcode c_xinvoke();
extern errcode c_condop();
extern errcode c_arraycons();
extern errcode c_selectcons();
extern errcode c_apply_ref();
extern errcode c_clusterop();
extern errcode c_force();
extern errcode c_up();
extern errcode c_down();
extern errcode c_bracketref();
extern errcode c_expr_type();
extern errcode c_anyize();
extern errcode c_type_of();
extern errcode c_envOPget_unknown_type();
extern errcode exprOPset_typespec();
CLUREF STR_not;
CLUREF STR_minus;
CLUREF STR_get_137;
CLUREF STR_fetch;
CLUREF STR_cand;
CLUREF STR_cor;
static int c_expr_own_init = 0;

/**** BEGIN PROCEDURE c_expr ****/

errcode c_expr(e, x, ret_1)
CLUREF e;
CLUREF x;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF t;
    CLUREF xa;
        if (c_expr_own_init == 0) {
        stringOPcons("not", CLU_1, CLU_3, &STR_not);
        stringOPcons("minus", CLU_1, CLU_5, &STR_minus);
        stringOPcons("get_", CLU_1, CLU_4, &STR_get_137);
        stringOPcons("fetch", CLU_1, CLU_5, &STR_fetch);
        stringOPcons("cand", CLU_1, CLU_4, &STR_cand);
        stringOPcons("cor", CLU_1, CLU_3, &STR_cor);
        c_expr_own_init = 1;
    }
    enter_proc(6);

  LINE(8);
    {
    CLUREF T_1_1;
    err = exprOPget_abs(x, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    switch (T_1_1.cell->tag) {
    case 19: 
         {

  LINE(10);
            {
            CLUREF T_2_1;
            err = c_envOPget_null_type(e, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 5: 
         {

  LINE(12);
            {
            CLUREF T_2_1;
            err = c_envOPget_bool_type(e, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 15: 
         {

  LINE(14);
            {
            CLUREF T_2_1;
            err = c_envOPget_int_type(e, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 21: 
         {

  LINE(16);
            {
            CLUREF T_2_1;
            err = c_envOPget_real_type(e, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 7: 
         {

  LINE(18);
            {
            CLUREF T_2_1;
            err = c_envOPget_char_type(e, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 24: 
         {

  LINE(20);
            {
            CLUREF T_2_1;
            err = c_envOPget_str_type(e, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 13: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        xa.num = T_1_2.num;

  LINE(22);
            {
            CLUREF T_2_1;
            err = c_idn(e, x, xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 14: 
         {CLUREF T_1_3;
        T_1_3.num = T_1_1.cell->value;
        xa.num = T_1_3.num;

  LINE(24);
            {
            CLUREF T_2_1;
            err = c_infix(e, x, xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 18: 
         {CLUREF T_1_4;
        T_1_4.num = T_1_1.cell->value;
        xa.num = T_1_4.num;

  LINE(26);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            err = sequenceOPe2s(xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            err = c_xsugar(e, x, STR_not, T_2_1, &T_2_2);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_2.num;
            }
            break;
            }
    case 17: 
         {CLUREF T_1_5;
        T_1_5.num = T_1_1.cell->value;
        xa.num = T_1_5.num;

  LINE(28);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            err = sequenceOPe2s(xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            err = c_xsugar(e, x, STR_minus, T_2_1, &T_2_2);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_2.num;
            }
            break;
            }
    case 12: 
         {CLUREF T_1_6;
        T_1_6.num = T_1_1.cell->value;
        xa.num = T_1_6.num;

  LINE(30);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            CLUREF T_2_4;
            CLUREF T_2_5;
            T_2_1.num = xa.vec->data[1];
            err = stringOPconcat(STR_get_137, T_2_1, &T_2_2);
            if (err != ERR_ok) goto ex_0;
            T_2_3.num = xa.vec->data[0];
            err = sequenceOPe2s(T_2_3, &T_2_4);
            if (err != ERR_ok) goto ex_0;
            err = c_sugar(e, x, T_2_2, T_2_4, &T_2_5);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_5.num;
            }
            break;
            }
    case 10: 
         {CLUREF T_1_7;
        T_1_7.num = T_1_1.cell->value;
        xa.num = T_1_7.num;

  LINE(32);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            CLUREF T_2_4;
            sequenceOPnew2(CLU_2, &T_2_1);
            T_2_2.num = xa.vec->data[1];
            T_2_1.vec->data[0] = T_2_2.num;
            T_2_3.num = xa.vec->data[0];
            T_2_1.vec->data[1] = T_2_3.num;
            err = c_sugar(e, x, STR_fetch, T_2_1, &T_2_4);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_4.num;
            }
            break;
            }
    case 16: 
         {CLUREF T_1_8;
        T_1_8.num = T_1_1.cell->value;
        xa.num = T_1_8.num;

  LINE(34);
            {
            CLUREF T_2_1;
            err = c_xinvoke(e, xa, CLU_0, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 6: 
         {CLUREF T_1_9;
        T_1_9.num = T_1_1.cell->value;
        xa.num = T_1_9.num;

  LINE(36);
            {
            CLUREF T_2_1;
            err = c_condop(e, xa, STR_cand, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 8: 
         {CLUREF T_1_10;
        T_1_10.num = T_1_1.cell->value;
        xa.num = T_1_10.num;

  LINE(38);
            {
            CLUREF T_2_1;
            err = c_condop(e, xa, STR_cor, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 1: 
         {CLUREF T_1_11;
        T_1_11.num = T_1_1.cell->value;
        xa.num = T_1_11.num;

  LINE(40);
            {
            CLUREF T_2_1;
            err = c_arraycons(e, x, xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 23: 
         {CLUREF T_1_12;
        T_1_12.num = T_1_1.cell->value;
        xa.num = T_1_12.num;

  LINE(42);
            {
            CLUREF T_2_1;
            err = c_selectcons(e, x, xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 3: 
         {CLUREF T_1_13;
        T_1_13.num = T_1_1.cell->value;
        xa.num = T_1_13.num;

  LINE(44);
            {
            CLUREF T_2_1;
            err = c_apply_ref(e, x, xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 20: 
         {CLUREF T_1_14;
        T_1_14.num = T_1_1.cell->value;
        xa.num = T_1_14.num;

  LINE(46);
            {
            CLUREF T_2_1;
            err = c_clusterop(e, xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 11: 
         {CLUREF T_1_15;
        T_1_15.num = T_1_1.cell->value;
        xa.num = T_1_15.num;

  LINE(48);
            {
            CLUREF T_2_1;
            err = c_force(e, x, xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 27: 
         {CLUREF T_1_16;
        T_1_16.num = T_1_1.cell->value;
        xa.num = T_1_16.num;

  LINE(50);
            {
            CLUREF T_2_1;
            err = c_up(e, xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 9: 
         {CLUREF T_1_17;
        T_1_17.num = T_1_1.cell->value;
        xa.num = T_1_17.num;

  LINE(52);
            {
            CLUREF T_2_1;
            err = c_down(e, xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 22: 
         {CLUREF T_1_18;
        T_1_18.num = T_1_1.cell->value;
        xa.num = T_1_18.num;

  LINE(54);
            {
            CLUREF T_2_1;
            err = c_bracketref(e, x, xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 25: 
         {CLUREF T_1_19;
        T_1_19.num = T_1_1.cell->value;
        xa.num = T_1_19.num;

  LINE(56);
            {
            CLUREF T_2_1;
            err = c_expr_type(e, x, xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 2: 
         {CLUREF T_1_20;
        T_1_20.num = T_1_1.cell->value;
        xa.num = T_1_20.num;

  LINE(58);
            {
            CLUREF T_2_1;
            err = c_anyize(e, xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    case 26: 
         {CLUREF T_1_21;
        T_1_21.num = T_1_1.cell->value;
        xa.num = T_1_21.num;

  LINE(60);
            {
            CLUREF T_2_1;
            err = c_type_of(e, xa, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_1.num;
            }
            break;
            }
    default: {

  LINE(62);
        {
        CLUREF T_2_1;
        err = c_envOPget_unknown_type(e, &T_2_1);
        if (err != ERR_ok) goto ex_0;
        t.num = T_2_1.num;
        }
    }
    }
    }

  LINE(64);
    {
    err = exprOPset_typespec(x, t);
    if (err != ERR_ok) goto ex_0;
    }

  LINE(65);
    {
    {
    ret_1->num = t.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_expr ****/


extern errcode idnOPget_kind();
extern errcode c_envOPtypes_illegal();
extern errcode c_envOPerr();
extern errcode idnOPget_str();
extern errcode exprOPset_abs();
extern errcode oneofOPmake_25();
extern errcode c_envOPget_type();
extern errcode oneofOPmake_5();
extern errcode c_envOPget_type_type();
extern errcode exprOPget_typespec();
extern errcode typespecOPequal();
extern errcode c_envOPget_up_type();
extern errcode sequenceOPnew();
extern errcode oneofOPmake_20();
extern errcode c_clusterop1();
extern errcode c_envOPlookup();
CLUREF STR_use_040of_040type_040parameter_040_047;
CLUREF STR__047_040as_040expression;
CLUREF STR__047;
CLUREF STR__047_040names_040a_040type;
CLUREF STR__047_040names_040a_040type_137set;
CLUREF STR_use_040of_040generator_040_047;
static int c_idn_own_init = 0;

/**** BEGIN PROCEDURE c_idn ****/

errcode c_idn(e, x, i, ret_1)
CLUREF e;
CLUREF x;
CLUREF i;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF k;
    CLUREF t;
    CLUREF cop;
        if (c_idn_own_init == 0) {
        stringOPcons("use of type parameter \'", CLU_1, CLU_23, &STR_use_040of_040type_040parameter_040_047);
        stringOPcons("\' as expression", CLU_1, CLU_15, &STR__047_040as_040expression);
        stringOPcons("\'", CLU_1, CLU_1, &STR__047);
        stringOPcons("\' names a type", CLU_1, CLU_14, &STR__047_040names_040a_040type);
        stringOPcons("\' names a type_set", CLU_1, CLU_18, &STR__047_040names_040a_040type_137set);
        stringOPcons("use of generator \'", CLU_1, CLU_18, &STR_use_040of_040generator_040_047);
        c_idn_own_init = 1;
    }
    enter_proc(68);

  LINE(69);
    {
    CLUREF T_1_1;
    err = idnOPget_kind(i, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    switch (T_1_1.cell->tag) {
    case 9: 
    case 4: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        k.num = T_1_2.num;

  LINE(71);
            {
            {
            ret_1->num = k.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 6: 
    case 5: 
         {

  LINE(73);
            {
            CLUREF T_2_1;
            err = c_envOPtypes_illegal(e, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            if (T_2_1.num == true) {

  LINE(74);
                {
                CLUREF T_3_1;
                CLUREF T_3_2;
                sequenceOPnew2(CLU_3, &T_3_1);
                T_3_1.vec->data[0] = STR_use_040of_040type_040parameter_040_047.num;
                err = idnOPget_str(i, &T_3_2);
                if (err != ERR_ok) goto ex_0;
                T_3_1.vec->data[1] = T_3_2.num;
                T_3_1.vec->data[2] = STR__047_040as_040expression.num;
                err = c_envOPerr(e, T_3_1);
                if (err != ERR_ok) goto ex_0;
                }
                }
                }/* end if */

  LINE(77);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            CellAlloc(5, i.num, T_2_1);
            err = c_envOPget_type(e, T_2_1, &T_2_2);
            if (err != ERR_ok) goto ex_0;
            CellAlloc(25, T_2_2.num, T_2_3);
            err = exprOPset_abs(x, T_2_3);
            if (err != ERR_ok) goto ex_0;
            }

  LINE(78);
            {
            {
            CLUREF T_2_1;
            err = c_envOPget_type_type(e, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 10: 
         {CLUREF T_1_3;
        T_1_3.num = T_1_1.cell->value;
        k.num = T_1_3.num;

  LINE(80);
            {
            {
            ret_1->num = k.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 1: 
         {CLUREF T_1_4;
        T_1_4.num = T_1_1.cell->value;
        k.num = T_1_4.num;

  LINE(82);
            {
            CLUREF T_2_1;
            err = exprOPget_abs(k, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            err = exprOPset_abs(x, T_2_1);
            if (err != ERR_ok) goto ex_0;
            }

  LINE(83);
            {
                {CLUREF T_2_1;
                err = exprOPget_typespec(k, &T_2_1);
                if (err != ERR_ok) goto ex_0;
                t.num = T_2_1.num;
                }
                }

  LINE(84);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            CLUREF T_2_4;
            err = c_envOPget_type_type(e, &T_2_2);
            if (err != ERR_ok) goto ex_0;
            err = typespecOPequal(t, T_2_2, &T_2_3);
            if (err != ERR_ok) goto ex_0;
            T_2_1.num = T_2_3.num;
            if (T_2_3.num) {
                err = c_envOPtypes_illegal(e, &T_2_4);
                if (err != ERR_ok) goto ex_0;
                T_2_1.num = T_2_4.num;
            }
            if (T_2_1.num == true) {

  LINE(85);
                {
                CLUREF T_3_1;
                CLUREF T_3_2;
                sequenceOPnew2(CLU_3, &T_3_1);
                T_3_1.vec->data[0] = STR__047.num;
                err = idnOPget_str(i, &T_3_2);
                if (err != ERR_ok) goto ex_0;
                T_3_1.vec->data[1] = T_3_2.num;
                T_3_1.vec->data[2] = STR__047_040names_040a_040type.num;
                err = c_envOPerr(e, T_3_1);
                if (err != ERR_ok) goto ex_0;
                }
                }
                }/* end if */

  LINE(86);
            {
            {
            ret_1->num = t.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 3: 
         {CLUREF T_1_5;
        T_1_5.num = T_1_1.cell->value;
        k.num = T_1_5.num;

  LINE(88);
            {
                {CLUREF T_2_1;
                CLUREF T_2_2;
                CLUREF T_2_3;
                RecordAlloc(3, T_2_1);
                err = c_envOPget_up_type(e, &T_2_2);
                if (err != ERR_ok) goto ex_0;
                T_2_1.vec->data[2]  = T_2_2.num;
                T_2_1.vec->data[0]  = k.num;
                err = sequenceOPnew(&T_2_3);
                if (err != ERR_ok) goto ex_0;
                T_2_1.vec->data[1]  = T_2_3.num;
                cop.num = T_2_1.num;
                }
                }

  LINE(91);
            {
            CLUREF T_2_1;
            CellAlloc(20, cop.num, T_2_1);
            err = exprOPset_abs(x, T_2_1);
            if (err != ERR_ok) goto ex_0;
            }

  LINE(92);
            {
            {
            CLUREF T_2_1;
            err = c_clusterop1(e, cop, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 7: 
         {

  LINE(94);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            sequenceOPnew2(CLU_3, &T_2_1);
            T_2_1.vec->data[0] = STR__047.num;
            err = idnOPget_str(i, &T_2_2);
            if (err != ERR_ok) goto ex_0;
            T_2_1.vec->data[1] = T_2_2.num;
            T_2_1.vec->data[2] = STR__047_040names_040a_040type_137set.num;
            err = c_envOPerr(e, T_2_1);
            if (err != ERR_ok) goto ex_0;
            }
            break;
            }
    case 2: 
         {

  LINE(96);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            sequenceOPnew2(CLU_3, &T_2_1);
            T_2_1.vec->data[0] = STR_use_040of_040generator_040_047.num;
            err = idnOPget_str(i, &T_2_2);
            if (err != ERR_ok) goto ex_0;
            T_2_1.vec->data[1] = T_2_2.num;
            T_2_1.vec->data[2] = STR__047_040as_040expression.num;
            err = c_envOPerr(e, T_2_1);
            if (err != ERR_ok) goto ex_0;
            }
            break;
            }
    case 8: 
         {

  LINE(98);
            {
            err = c_envOPlookup(e, i, CLU_2);
            if (err != ERR_ok) goto ex_0;
            }

  LINE(99);
            {
            {
            CLUREF T_2_1;
            err = c_idn(e, x, i, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    }
    }

  LINE(101);
    {
    {
    CLUREF T_1_1;
    err = c_envOPget_unknown_type(e, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_idn ****/


extern errcode recordOPset_2();
extern errcode exprOPcreate();
extern errcode recordOPget_3();
extern errcode recordOPget_4();
static int c_infix_own_init = 0;

/**** BEGIN PROCEDURE c_infix ****/

errcode c_infix(e, x, fix, ret_1)
CLUREF e;
CLUREF x;
CLUREF fix;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF x1;
        if (c_infix_own_init == 0) {
        stringOPcons("not", CLU_1, CLU_3, &STR_not);
        c_infix_own_init = 1;
    }
    enter_proc(104);

  LINE(105);
    {
    CLUREF T_1_1;
    T_1_1.num = fix.vec->data[1];
    if (T_1_1.num == true) {

  LINE(106);
        {
        fix.vec->data[1]  = false;
        }

  LINE(107);
        {
            {CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            err = exprOPget_abs(x, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            err = c_envOPget_unknown_type(e, &T_2_2);
            if (err != ERR_ok) goto ex_0;
            err = exprOPcreate(T_2_1, T_2_2, &T_2_3);
            if (err != ERR_ok) goto ex_0;
            x1.num = T_2_3.num;
            }
            }

  LINE(108);
        {
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        err = sequenceOPe2s(x1, &T_2_1);
        if (err != ERR_ok) goto ex_0;
        err = c_xsugar(e, x, STR_not, T_2_1, &T_2_2);
        if (err != ERR_ok) goto ex_0;
        ret_1->num = T_2_2.num;
        }
        {signal (ERR_ok);}}
        }
    else {

  LINE(109);
        {
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        CLUREF T_2_4;
        CLUREF T_2_5;
        T_2_1.num = fix.vec->data[2];
        sequenceOPnew2(CLU_2, &T_2_2);
        T_2_3.num = fix.vec->data[0];
        T_2_2.vec->data[0] = T_2_3.num;
        T_2_4.num = fix.vec->data[3];
        T_2_2.vec->data[1] = T_2_4.num;
        err = c_xsugar(e, x, T_2_1, T_2_2, &T_2_5);
        if (err != ERR_ok) goto ex_0;
        ret_1->num = T_2_5.num;
        }
        {signal (ERR_ok);}}
        }}/* end if */
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_infix ****/


extern errcode c_expr();
extern errcode sequenceOPbottom();
extern errcode oneofOPmake_16();

/**** BEGIN PROCEDURE c_sugar ****/

errcode c_sugar(e, x, n, args, ret_1)
CLUREF e;
CLUREF x;
CLUREF n;
CLUREF args;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF t;
    CLUREF op;
    CLUREF inv;
    enter_proc(113);

  LINE(114);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        err = sequenceOPbottom(args, &T_1_1);
        if (err != ERR_ok) goto ex_0;
        err = c_expr(e, T_1_1, &T_1_2);
        if (err != ERR_ok) goto ex_0;
        t.num = T_1_2.num;
        }
        }

  LINE(115);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        RecordAlloc(3, T_1_1);
        T_1_1.vec->data[2]  = t.num;
        T_1_1.vec->data[0]  = n.num;
        err = sequenceOPnew(&T_1_2);
        if (err != ERR_ok) goto ex_0;
        T_1_1.vec->data[1]  = T_1_2.num;
        op.num = T_1_1.num;
        }
        }

  LINE(118);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        CLUREF T_1_3;
        CLUREF T_1_4;
        RecordAlloc(2, T_1_1);
        CellAlloc(20, op.num, T_1_2);
        err = c_envOPget_unknown_type(e, &T_1_3);
        if (err != ERR_ok) goto ex_0;
        err = exprOPcreate(T_1_2, T_1_3, &T_1_4);
        if (err != ERR_ok) goto ex_0;
        T_1_1.vec->data[0]  = T_1_4.num;
        T_1_1.vec->data[1]  = args.num;
        inv.num = T_1_1.num;
        }
        }

  LINE(120);
    {
    CLUREF T_1_1;
    CellAlloc(16, inv.num, T_1_1);
    err = exprOPset_abs(x, T_1_1);
    if (err != ERR_ok) goto ex_0;
    }

  LINE(121);
    {
    {
    CLUREF T_1_1;
    err = c_xinvoke(e, inv, CLU_1, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_sugar ****/


extern errcode sequenceOPelements();
extern errcode e_expr();

/**** BEGIN PROCEDURE c_xsugar ****/

errcode c_xsugar(e, x, n, args, ret_1)
CLUREF e;
CLUREF x;
CLUREF n;
CLUREF args;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF t;
    CLUREF op;
    CLUREF inv;
    CLUREF xx;
    enter_proc(124);

  LINE(125);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        err = sequenceOPbottom(args, &T_1_1);
        if (err != ERR_ok) goto ex_0;
        err = c_expr(e, T_1_1, &T_1_2);
        if (err != ERR_ok) goto ex_0;
        t.num = T_1_2.num;
        }
        }

  LINE(126);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        RecordAlloc(3, T_1_1);
        T_1_1.vec->data[2]  = t.num;
        T_1_1.vec->data[0]  = n.num;
        err = sequenceOPnew(&T_1_2);
        if (err != ERR_ok) goto ex_0;
        T_1_1.vec->data[1]  = T_1_2.num;
        op.num = T_1_1.num;
        }
        }

  LINE(129);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        CLUREF T_1_3;
        CLUREF T_1_4;
        RecordAlloc(2, T_1_1);
        CellAlloc(20, op.num, T_1_2);
        err = c_envOPget_unknown_type(e, &T_1_3);
        if (err != ERR_ok) goto ex_0;
        err = exprOPcreate(T_1_2, T_1_3, &T_1_4);
        if (err != ERR_ok) goto ex_0;
        T_1_1.vec->data[0]  = T_1_4.num;
        T_1_1.vec->data[1]  = args.num;
        inv.num = T_1_1.num;
        }
        }

  LINE(131);
    {
    CLUREF T_1_1;
    CellAlloc(16, inv.num, T_1_1);
    err = exprOPset_abs(x, T_1_1);
    if (err != ERR_ok) goto ex_0;
    }

  LINE(132);
    {
    CLUREF T_1_1;
    err = c_xinvoke(e, inv, CLU_1, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    t.num = T_1_1.num;
    }

  LINE(133);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
        T_1_2.num = args.vec->size; 
        T_1_3 = args;
        for (T_1_1.num = 1; T_1_1.num <= T_1_2.num; T_1_1.num++) {
            xx.num = T_1_3.vec->data[T_1_1.num - 1];

  LINE(134);
            {
            CLUREF T_2_1;
            err = exprOPget_abs(xx, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            switch (T_2_1.cell->tag) {
            case 19: 
            case 5: 
            case 15: 
            case 21: 
            case 7: 
            case 24: 
                 {
                    break;
                    }
            default: {

  LINE(137);
                {
                {
                ret_1->num = t.num;
                }
                {signal (ERR_ok);}}
            }
            }
            }
        }
    }
    end_inline_for_1:;

  LINE(140);
    {
    err = exprOPset_typespec(x, t);
    if (err != ERR_ok) goto ex_0;
    }

  LINE(141);
    {
        {CLUREF T_1_1;
        err = e_expr(e, x, &T_1_1);
        if (err != ERR_ok) goto ex_0;
        xx.num = T_1_1.num;
        }
        }

  LINE(142);
    {
    CLUREF T_1_1;
    err = exprOPget_abs(xx, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    err = exprOPset_abs(x, T_1_1);
    if (err != ERR_ok) goto ex_0;
    }

  LINE(143);
    {
    {
    ret_1->num = t.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_xsugar ****/


extern errcode c_invoke();
extern errcode intOPequal();
extern errcode sequenceOPsize();
extern errcode get_inv_print();
extern errcode intOPunparse();
CLUREF STR__047_040returns_040;
CLUREF STR__040values_054_0401_040expected;
static int c_xinvoke_own_init = 0;

/**** BEGIN PROCEDURE c_xinvoke ****/

errcode c_xinvoke(e, inv, done_first, ret_1)
CLUREF e;
CLUREF inv;
CLUREF done_first;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF types;
        if (c_xinvoke_own_init == 0) {
        stringOPcons("\'", CLU_1, CLU_1, &STR__047);
        stringOPcons("\' returns ", CLU_1, CLU_10, &STR__047_040returns_040);
        stringOPcons(" values, 1 expected", CLU_1, CLU_19, &STR__040values_054_0401_040expected);
        c_xinvoke_own_init = 1;
    }
    enter_proc(146);

  LINE(147);
    {
        {CLUREF T_1_1;
        err = c_invoke(e, inv, done_first, &T_1_1);
        if (err != ERR_ok) goto ex_0;
        types.num = T_1_1.num;
        }
        }

  LINE(148);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = types.vec->size;
    T_1_2.num = (T_1_1.num == 1)? true : false;
    if (T_1_2.num == true) {

  LINE(149);
        {
        {
        CLUREF T_2_1;
        err = sequenceOPbottom(types, &T_2_1);
        if (err != ERR_ok) goto ex_0;
        ret_1->num = T_2_1.num;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(150);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
    sequenceOPnew2(CLU_5, &T_1_1);
    T_1_1.vec->data[0] = STR__047.num;
    err = get_inv_print(inv, &T_1_2);
    if (err != ERR_ok) goto ex_0;
    T_1_1.vec->data[1] = T_1_2.num;
    T_1_1.vec->data[2] = STR__047_040returns_040.num;
    T_1_3.num = types.vec->size;
    err = intOPunparse(T_1_3, &T_1_4);
    if (err != ERR_ok) goto ex_0;
    T_1_1.vec->data[3] = T_1_4.num;
    T_1_1.vec->data[4] = STR__040values_054_0401_040expected.num;
    err = c_envOPerr(e, T_1_1);
    if (err != ERR_ok) goto ex_0;
    }

  LINE(153);
    {
    {
    CLUREF T_1_1;
    err = c_envOPget_unknown_type(e, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_xinvoke ****/


extern errcode typespecOPmismatch();
extern errcode c_envOPerrt();
CLUREF STR_argument_0401_040to_040;
CLUREF STR__040operator;
CLUREF STR_argument_0402_040to_040;
static int c_condop_own_init = 0;

/**** BEGIN PROCEDURE c_condop ****/

errcode c_condop(e, cx, op, ret_1)
CLUREF e;
CLUREF cx;
CLUREF op;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF t;
        if (c_condop_own_init == 0) {
        stringOPcons("argument 1 to ", CLU_1, CLU_14, &STR_argument_0401_040to_040);
        stringOPcons(" operator", CLU_1, CLU_9, &STR__040operator);
        stringOPcons("argument 2 to ", CLU_1, CLU_14, &STR_argument_0402_040to_040);
        c_condop_own_init = 1;
    }
    enter_proc(156);

  LINE(157);
    {
        {CLUREF T_1_1;
        err = c_envOPget_bool_type(e, &T_1_1);
        if (err != ERR_ok) goto ex_0;
        t.num = T_1_1.num;
        }
        }

  LINE(158);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    T_1_1.num = cx.vec->data[0];
    err = c_expr(e, T_1_1, &T_1_2);
    if (err != ERR_ok) goto ex_0;
    err = typespecOPmismatch(t, T_1_2, &T_1_3);
    if (err != ERR_ok) goto ex_0;
    if (T_1_3.num == true) {

  LINE(159);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        CLUREF T_2_4;
        sequenceOPnew2(CLU_3, &T_2_1);
        T_2_1.vec->data[0] = STR_argument_0401_040to_040.num;
        T_2_1.vec->data[1] = op.num;
        T_2_1.vec->data[2] = STR__040operator.num;
        err = c_envOPget_bool_type(e, &T_2_2);
        if (err != ERR_ok) goto ex_0;
        T_2_3.num = cx.vec->data[0];
        err = exprOPget_typespec(T_2_3, &T_2_4);
        if (err != ERR_ok) goto ex_0;
        err = c_envOPerrt(e, T_2_1, T_2_2, T_2_4);
        if (err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(162);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    T_1_1.num = cx.vec->data[1];
    err = c_expr(e, T_1_1, &T_1_2);
    if (err != ERR_ok) goto ex_0;
    err = typespecOPmismatch(t, T_1_2, &T_1_3);
    if (err != ERR_ok) goto ex_0;
    if (T_1_3.num == true) {

  LINE(163);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        CLUREF T_2_4;
        sequenceOPnew2(CLU_3, &T_2_1);
        T_2_1.vec->data[0] = STR_argument_0402_040to_040.num;
        T_2_1.vec->data[1] = op.num;
        T_2_1.vec->data[2] = STR__040operator.num;
        err = c_envOPget_bool_type(e, &T_2_2);
        if (err != ERR_ok) goto ex_0;
        T_2_3.num = cx.vec->data[1];
        err = exprOPget_typespec(T_2_3, &T_2_4);
        if (err != ERR_ok) goto ex_0;
        err = c_envOPerrt(e, T_2_1, T_2_2, T_2_4);
        if (err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(166);
    {
    {
    ret_1->num = t.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_condop ****/


extern errcode c_type();
extern errcode recordOPset_3();
extern errcode c_element_type();
extern errcode c_acons_sugar();
extern errcode boolOPnot();
extern errcode c_envOPerr1();
extern errcode sequenceOPindexes();
extern errcode sequenceOPfetch();
extern errcode oneofOPmake_2();
extern errcode c_envOPget_any_type();
extern errcode recordOPset_1();
extern errcode sequenceOPreplace();
CLUREF STR_sequence_040constructor_040cannot_040have_040low_040bound;
CLUREF STR_low_040bound_040of_040array_040constructor;
CLUREF STR_element_040;
CLUREF STR__040of_040array_057sequence_040constructor;
static int c_arraycons_own_init = 0;

/**** BEGIN PROCEDURE c_arraycons ****/

errcode c_arraycons(e, x, cons, ret_1)
CLUREF e;
CLUREF x;
CLUREF cons;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF at;
    CLUREF t;
    CLUREF is_array;
    CLUREF low;
    CLUREF elts;
    CLUREF i;
    CLUREF z;
        if (c_arraycons_own_init == 0) {
        stringOPcons("sequence constructor cannot have low bound", CLU_1, CLU_42, &STR_sequence_040constructor_040cannot_040have_040low_040bound);
        stringOPcons("low bound of array constructor", CLU_1, CLU_30, &STR_low_040bound_040of_040array_040constructor);
        stringOPcons("element ", CLU_1, CLU_8, &STR_element_040);
        stringOPcons(" of array/sequence constructor", CLU_1, CLU_30, &STR__040of_040array_057sequence_040constructor);
        c_arraycons_own_init = 1;
    }
    enter_proc(169);

  LINE(170);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        T_1_1.num = cons.vec->data[2];
        err = c_type(e, T_1_1, &T_1_2);
        if (err != ERR_ok) goto ex_0;
        at.num = T_1_2.num;
        }
        }

  LINE(171);
    {
    cons.vec->data[2]  = at.num;
    }

  LINE(172);
    {
        {CLUREF T_2_1;
        CLUREF T_2_2;
        err = c_element_type(e, at, &T_2_1, &T_2_2);
        if (err != ERR_ok) goto ex_1;
        t.num = T_2_1.num;
        is_array.num = T_2_2.num;
        }
        }
        goto end_1;
        ex_1:
            if ((err == ERR_abstract)) {

  LINE(173);
                {
                {
                CLUREF T_2_1;
                err = c_acons_sugar(e, x, cons, &T_2_1);
                if (err != ERR_ok) goto ex_0;
                ret_1->num = T_2_1.num;
                }
                {signal (ERR_ok);}}
            }
            else {
                goto ex_0;
            }
        end_1:;

  LINE(174);
    {
    CLUREF T_1_1;
    T_1_1.num = cons.vec->data[1];
    switch (T_1_1.cell->tag) {
    case 2: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        low.num = T_1_2.num;

  LINE(176);
            {
            CLUREF T_2_1;
            T_2_1.num = is_array.num ^ 1;
            if (T_2_1.num == true) {

  LINE(177);
                {
                err = c_envOPerr1(e, STR_sequence_040constructor_040cannot_040have_040low_040bound);
                if (err != ERR_ok) goto ex_0;
                }
                }
            else {
            CLUREF T_2_2;
            CLUREF T_2_3;
            CLUREF T_2_4;
            err = c_envOPget_int_type(e, &T_2_2);
            if (err != ERR_ok) goto ex_0;
            err = c_expr(e, low, &T_2_3);
            if (err != ERR_ok) goto ex_0;
            err = typespecOPmismatch(T_2_2, T_2_3, &T_2_4);
            if (err != ERR_ok) goto ex_0;
            if (T_2_4.num == true) {

  LINE(179);
                {
                CLUREF T_3_1;
                CLUREF T_3_2;
                CLUREF T_3_3;
                sequenceOPnew2(CLU_1, &T_3_1);
                T_3_1.vec->data[0] = STR_low_040bound_040of_040array_040constructor.num;
                err = c_envOPget_int_type(e, &T_3_2);
                if (err != ERR_ok) goto ex_0;
                err = exprOPget_typespec(low, &T_3_3);
                if (err != ERR_ok) goto ex_0;
                err = c_envOPerrt(e, T_3_1, T_3_2, T_3_3);
                if (err != ERR_ok) goto ex_0;
                }
                }
                }}/* end if */
            break;
            }
    case 1: 
         {
            break;
            }
    }
    }

  LINE(184);
    {
        {CLUREF T_1_1;
        T_1_1.num = cons.vec->data[0];
        elts.num = T_1_1.num;
        }
        }

  LINE(185);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
        T_1_2.num = elts.vec->size; 
        for (T_1_1.num = 1; T_1_1.num <= T_1_2.num; T_1_1.num++) {
            i.num = T_1_1.num;

  LINE(186);
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            CLUREF T_3_3;
            if (i.num < 1 || i.num > elts.vec->size ) {
                err = ERR_bounds;
                goto ex_2;}
            T_3_1.num = elts.vec->data[i.num - 1];
            err = c_expr(e, T_3_1, &T_3_2);
            if (err != ERR_ok) goto ex_2;
            err = typespecOPmismatch(t, T_3_2, &T_3_3);
            if (err != ERR_ok) goto ex_2;
            if (T_3_3.num == true) {

  LINE(187);
                {
                CLUREF T_4_1;
                CLUREF T_4_2;
                CLUREF T_4_3;
                CLUREF T_4_4;
                sequenceOPnew2(CLU_3, &T_4_1);
                T_4_1.vec->data[0] = STR_element_040.num;
                err = intOPunparse(i, &T_4_2);
                if (err != ERR_ok) goto ex_2;
                T_4_1.vec->data[1] = T_4_2.num;
                T_4_1.vec->data[2] = STR__040of_040array_057sequence_040constructor.num;
                if (i.num < 1 || i.num > elts.vec->size ) {
                    err = ERR_bounds;
                    goto ex_2;}
                T_4_3.num = elts.vec->data[i.num - 1];
                err = exprOPget_typespec(T_4_3, &T_4_4);
                if (err != ERR_ok) goto ex_2;
                err = c_envOPerrt(e, T_4_1, t, T_4_4);
                if (err != ERR_ok) goto ex_2;
                }
                }
                }/* end if */
                goto end_2;
                ex_2:
                    if ((err == ERR_anyize)) {

  LINE(191);
                        {
                            {CLUREF T_3_1;
                            CLUREF T_3_2;
                            CLUREF T_3_3;
                            CLUREF T_3_4;
                            if (i.num < 1 || i.num > elts.vec->size ) {
                                err = ERR_bounds;
                                goto ex_0;}
                            T_3_1.num = elts.vec->data[i.num - 1];
                            CellAlloc(2, T_3_1.num, T_3_2);
                            err = c_envOPget_any_type(e, &T_3_3);
                            if (err != ERR_ok) goto ex_0;
                            err = exprOPcreate(T_3_2, T_3_3, &T_3_4);
                            if (err != ERR_ok) goto ex_0;
                            z.num = T_3_4.num;
                            }
                            }

  LINE(193);
                        {
                        CLUREF T_3_1;
                        CLUREF T_3_2;
                        T_3_1.num = cons.vec->data[0];
                        err = sequenceOPreplace(T_3_1, i, z, &T_3_2);
                        if (err != ERR_ok) goto ex_0;
                        cons.vec->data[0]  = T_3_2.num;
                        }
                    }
                    else {
                        goto ex_0;
                    }
                end_2:;
        }
    }
    end_inline_for_1:;

  LINE(196);
    {
    {
    ret_1->num = at.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_arraycons ****/


extern errcode sequenceOPempty();
extern errcode c_envOPget_seq_();
extern errcode oneofOPmake_3();
extern errcode oneofOPmake_1();
CLUREF STR_create;
CLUREF STR_new;
CLUREF STR_cons2;
CLUREF STR_cons;
static int c_acons_sugar_own_init = 0;

/**** BEGIN PROCEDURE c_acons_sugar ****/

errcode c_acons_sugar(e, x, cons, ret_1)
CLUREF e;
CLUREF x;
CLUREF cons;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF at;
    CLUREF elts;
    CLUREF op;
    CLUREF args;
    CLUREF low;
    CLUREF t;
    CLUREF nx;
    CLUREF clut;
    CLUREF cop;
    CLUREF inv;
        if (c_acons_sugar_own_init == 0) {
        stringOPcons("create", CLU_1, CLU_6, &STR_create);
        stringOPcons("new", CLU_1, CLU_3, &STR_new);
        stringOPcons("cons2", CLU_1, CLU_5, &STR_cons2);
        stringOPcons("cons", CLU_1, CLU_4, &STR_cons);
        c_acons_sugar_own_init = 1;
    }
    enter_proc(199);

  LINE(200);
    {
        {CLUREF T_1_1;
        T_1_1.num = cons.vec->data[2];
        at.num = T_1_1.num;
        }
        }

  LINE(201);
    {
        {CLUREF T_1_1;
        T_1_1.num = cons.vec->data[0];
        elts.num = T_1_1.num;
        }
        }

  LINE(204);
    {
    CLUREF T_1_1;
    err = sequenceOPempty(elts, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    if (T_1_1.num == true) {

  LINE(205);
        {
        CLUREF T_2_1;
        T_2_1.num = cons.vec->data[1];
        switch (T_2_1.cell->tag) {
        case 2: 
             {CLUREF T_2_2;
            T_2_2.num = T_2_1.cell->value;
            low.num = T_2_2.num;

  LINE(207);
                {
                op = STR_create;
                }

  LINE(208);
                {
                CLUREF T_3_1;
                err = sequenceOPe2s(low, &T_3_1);
                if (err != ERR_ok) goto ex_0;
                args.num = T_3_1.num;
                }
                break;
                }
        case 1: 
             {

  LINE(210);
                {
                op = STR_new;
                }

  LINE(211);
                {
                CLUREF T_3_1;
                err = sequenceOPnew(&T_3_1);
                if (err != ERR_ok) goto ex_0;
                args.num = T_3_1.num;
                }
                break;
                }
        }
        }
        }
    else {

  LINE(213);
        {
            {CLUREF T_2_1;
            CLUREF T_2_2;
            err = sequenceOPbottom(elts, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            err = c_expr(e, T_2_1, &T_2_2);
            if (err != ERR_ok) goto ex_0;
            t.num = T_2_2.num;
            }
            }

  LINE(214);
        {
            {CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            CellAlloc(25, t.num, T_2_1);
            err = c_envOPget_type_type(e, &T_2_2);
            if (err != ERR_ok) goto ex_0;
            err = exprOPcreate(T_2_1, T_2_2, &T_2_3);
            if (err != ERR_ok) goto ex_0;
            nx.num = T_2_3.num;
            }
            }

  LINE(215);
        {
            {CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            RecordAlloc(2, T_2_1);
            err = c_envOPget_seq_(e, &T_2_2);
            if (err != ERR_ok) goto ex_0;
            T_2_1.vec->data[0]  = T_2_2.num;
            err = sequenceOPe2s(nx, &T_2_3);
            if (err != ERR_ok) goto ex_0;
            T_2_1.vec->data[1]  = T_2_3.num;
            clut.num = T_2_1.num;
            }
            }

  LINE(217);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CellAlloc(3, clut.num, T_2_1);
        err = c_envOPget_type(e, T_2_1, &T_2_2);
        if (err != ERR_ok) goto ex_0;
        cons.vec->data[2]  = T_2_2.num;
        }

  LINE(218);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        CLUREF T_2_3;
        err = exprOPget_abs(x, &T_2_1);
        if (err != ERR_ok) goto ex_0;
        err = c_envOPget_unknown_type(e, &T_2_2);
        if (err != ERR_ok) goto ex_0;
        err = exprOPcreate(T_2_1, T_2_2, &T_2_3);
        if (err != ERR_ok) goto ex_0;
        nx.num = T_2_3.num;
        }

  LINE(219);
        {
        CLUREF T_2_1;
        T_2_1.num = cons.vec->data[1];
        switch (T_2_1.cell->tag) {
        case 2: 
             {CLUREF T_2_2;
            T_2_2.num = T_2_1.cell->value;
            low.num = T_2_2.num;

  LINE(221);
                {
                op = STR_cons2;
                }

  LINE(222);
                {
                CLUREF T_3_1;
                sequenceOPnew2(CLU_2, &T_3_1);
                T_3_1.vec->data[0] = low.num;
                T_3_1.vec->data[1] = nx.num;
                args.num = T_3_1.num;
                }

  LINE(223);
                {
                CLUREF T_3_1;
                CellAlloc(1, nil, T_3_1);
                cons.vec->data[1]  = T_3_1.num;
                }
                break;
                }
        case 1: 
             {

  LINE(225);
                {
                op = STR_cons;
                }

  LINE(226);
                {
                CLUREF T_3_1;
                err = sequenceOPe2s(nx, &T_3_1);
                if (err != ERR_ok) goto ex_0;
                args.num = T_3_1.num;
                }
                break;
                }
        }
        }
        }}/* end if */

  LINE(229);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        RecordAlloc(3, T_1_1);
        T_1_1.vec->data[2]  = at.num;
        T_1_1.vec->data[0]  = op.num;
        err = sequenceOPnew(&T_1_2);
        if (err != ERR_ok) goto ex_0;
        T_1_1.vec->data[1]  = T_1_2.num;
        cop.num = T_1_1.num;
        }
        }

  LINE(232);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        CLUREF T_1_3;
        CellAlloc(20, cop.num, T_1_1);
        err = c_envOPget_unknown_type(e, &T_1_2);
        if (err != ERR_ok) goto ex_0;
        err = exprOPcreate(T_1_1, T_1_2, &T_1_3);
        if (err != ERR_ok) goto ex_0;
        nx.num = T_1_3.num;
        }
        }

  LINE(233);
    {
        {CLUREF T_1_1;
        RecordAlloc(2, T_1_1);
        T_1_1.vec->data[0]  = nx.num;
        T_1_1.vec->data[1]  = args.num;
        inv.num = T_1_1.num;
        }
        }

  LINE(235);
    {
    CLUREF T_1_1;
    CellAlloc(16, inv.num, T_1_1);
    err = exprOPset_abs(x, T_1_1);
    if (err != ERR_ok) goto ex_0;
    }

  LINE(236);
    {
    {
    CLUREF T_1_1;
    err = c_xinvoke(e, inv, CLU_0, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_acons_sugar ****/


extern errcode typespecOPget_abs();
extern errcode duOPequal();
extern errcode c_envOPget_array_();
extern errcode c_envOPis_hacked();
extern errcode get_type_print();
CLUREF STR_constructor_040has_040illegal_040type_137spec_072_040;
static int c_element_type_own_init = 0;

/**** BEGIN PROCEDURE c_element_type ****/

errcode c_element_type(e, t, ret_1, ret_2)
CLUREF e;
CLUREF t;
CLUREF *ret_1;
CLUREF *ret_2;
    {
    errcode err;
    errcode ecode2;
    CLUREF ta;
    CLUREF is_array;
    CLUREF x;
    CLUREF xa;
        if (c_element_type_own_init == 0) {
        stringOPcons("constructor has illegal type_spec: ", CLU_1, CLU_35, &STR_constructor_040has_040illegal_040type_137spec_072_040);
        c_element_type_own_init = 1;
    }
    enter_proc(239);

  LINE(241);
    {
    CLUREF T_1_1;
    err = typespecOPget_abs(t, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    switch (T_1_1.cell->tag) {
    case 3: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        ta.num = T_1_2.num;

  LINE(243);
            {
                {CLUREF T_2_1;
                CLUREF T_2_2;
                CLUREF T_2_3;
                T_2_1.num = ta.vec->data[0];
                err = c_envOPget_array_(e, &T_2_2);
                if (err != ERR_ok) goto ex_0;
                err = duOPequal(T_2_1, T_2_2, &T_2_3);
                if (err != ERR_ok) goto ex_0;
                is_array.num = T_2_3.num;
                }
                }

  LINE(244);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            CLUREF T_2_4;
            T_2_1.num = is_array.num;
            if (!is_array.num) {
                T_2_2.num = ta.vec->data[0];
                err = c_envOPget_seq_(e, &T_2_3);
                if (err != ERR_ok) goto ex_0;
                err = duOPequal(T_2_2, T_2_3, &T_2_4);
                if (err != ERR_ok) goto ex_0;
                T_2_1.num = T_2_4.num;
            }
            if (T_2_1.num == true) {

  LINE(245);
                {
                    {CLUREF T_3_1;
                    CLUREF T_3_2;
                    T_3_1.num = ta.vec->data[1];
                    err = sequenceOPbottom(T_3_1, &T_3_2);
                    if (err != ERR_ok) goto ex_0;
                    x.num = T_3_2.num;
                    }
                    }

  LINE(246);
                {
                CLUREF T_3_1;
                err = exprOPget_abs(x, &T_3_1);
                if (err != ERR_ok) goto ex_0;
                switch (T_3_1.cell->tag) {
                case 25: 
                     {CLUREF T_3_2;
                    T_3_2.num = T_3_1.cell->value;
                    xa.num = T_3_2.num;

  LINE(248);
                        {
                        {
                        ret_1->num = xa.num;
                        }
                        {
                        ret_2->num = is_array.num;
                        }
                        {signal (ERR_ok);}}
                        break;
                        }
                default: {
                }
                }
                }
                }
                }/* end if */
            break;
            }
    case 9: 
         {

  LINE(253);
            {
            {
            ret_1->num = t.num;
            }
            {
            ret_2->tf = true;
            }
            {signal (ERR_ok);}}
            break;
            }
    default: {
    }
    }
    }

  LINE(256);
    {
    CLUREF T_1_1;
    err = c_envOPis_hacked(e, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    if (T_1_1.num == true) {

  LINE(257);
        {
        {signal (ERR_abstract);}}
        }
        }/* end if */

  LINE(258);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    sequenceOPnew2(CLU_2, &T_1_1);
    T_1_1.vec->data[0] = STR_constructor_040has_040illegal_040type_137spec_072_040.num;
    err = get_type_print(t, &T_1_2);
    if (err != ERR_ok) goto ex_0;
    T_1_1.vec->data[1] = T_1_2.num;
    err = c_envOPerr(e, T_1_1);
    if (err != ERR_ok) goto ex_0;
    }

  LINE(260);
    {
    {
    CLUREF T_1_1;
    err = c_envOPget_unknown_type(e, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    ret_1->num = T_1_1.num;
    }
    {
    ret_2->tf = true;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_element_type ****/


extern errcode c_select_specs();
extern errcode c_scons_sugar();
extern errcode arrayOPfill();
extern errcode c_envOPset_line();
extern errcode c_sel();
extern errcode arrayOPindexes();
extern errcode arrayOPfetch();
extern errcode sequenceOPaddh();
CLUREF STR_value_040of_040_047;
CLUREF STR__047_040field;
CLUREF STR_fields_040missing_040in_040record_057struct_040constructor_072_040;
CLUREF STR__054_040;
static int c_selectcons_own_init = 0;

/**** BEGIN PROCEDURE c_selectcons ****/

errcode c_selectcons(e, x, cons, ret_1)
CLUREF e;
CLUREF x;
CLUREF cons;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF t;
    CLUREF specs;
    CLUREF used;
    CLUREF fld;
    CLUREF t1;
    CLUREF sel;
    CLUREF nt;
    CLUREF q;
    CLUREF sep;
    CLUREF i;
        if (c_selectcons_own_init == 0) {
        stringOPcons("value of \'", CLU_1, CLU_10, &STR_value_040of_040_047);
        stringOPcons("\' field", CLU_1, CLU_7, &STR__047_040field);
        stringOPcons("fields missing in record/struct constructor: ", CLU_1, CLU_45, &STR_fields_040missing_040in_040record_057struct_040constructor_072_040);
        stringOPcons(", ", CLU_1, CLU_2, &STR__054_040);
        c_selectcons_own_init = 1;
    }
    enter_proc(263);

  LINE(264);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        T_1_1.num = cons.vec->data[1];
        err = c_type(e, T_1_1, &T_1_2);
        if (err != ERR_ok) goto ex_0;
        t.num = T_1_2.num;
        }
        }

  LINE(265);
    {
    cons.vec->data[1]  = t.num;
    }

  LINE(266);
    {
        {CLUREF T_2_1;
        err = c_select_specs(e, t, &T_2_1);
        if (err != ERR_ok) goto ex_1;
        specs.num = T_2_1.num;
        }
        }
        goto end_1;
        ex_1:
            if ((err == ERR_abstract)) {

  LINE(267);
                {
                {
                CLUREF T_2_1;
                err = c_scons_sugar(e, x, cons, &T_2_1);
                if (err != ERR_ok) goto ex_0;
                ret_1->num = T_2_1.num;
                }
                {signal (ERR_ok);}}
            }
            else {
                goto ex_0;
            }
        end_1:;

  LINE(268);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        T_1_1.num = specs.vec->size;
        err = arrayOPfill(CLU_1, T_1_1, CLU_0, &T_1_2);
        if (err != ERR_ok) goto ex_0;
        used.num = T_1_2.num;
        }
        }

  LINE(269);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
        T_1_1.num = cons.vec->data[0];
        T_1_3.num = T_1_1.vec->size; 
        T_1_4 = T_1_1;
        for (T_1_2.num = 1; T_1_2.num <= T_1_3.num; T_1_2.num++) {
            fld.num = T_1_4.vec->data[T_1_2.num - 1];

  LINE(270);
            {
            CLUREF T_2_1;
            T_2_1.num = fld.vec->data[0];
            err = c_envOPset_line(e, T_2_1);
            if (err != ERR_ok) goto ex_0;
            }

  LINE(271);
            {
                {CLUREF T_2_1;
                CLUREF T_2_2;
                T_2_1.num = fld.vec->data[2];
                err = c_expr(e, T_2_1, &T_2_2);
                if (err != ERR_ok) goto ex_0;
                t1.num = T_2_2.num;
                }
                }

  LINE(272);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            CLUREF T_2_4;
                T_2_1.num = fld.vec->data[1];
                T_2_3.num = T_2_1.vec->size; 
                T_2_4 = T_2_1;
                for (T_2_2.num = 1; T_2_2.num <= T_2_3.num; T_2_2.num++) {
                    sel.num = T_2_4.vec->data[T_2_2.num - 1];

  LINE(273);
                    {
                        {CLUREF T_3_1;
                        err = c_sel(e, specs, used, sel, &T_3_1);
                        if (err != ERR_ok) goto ex_0;
                        nt.num = T_3_1.num;
                        }
                        }

  LINE(274);
                    {
                    CLUREF T_4_1;
                    err = typespecOPmismatch(nt, t1, &T_4_1);
                    if (err != ERR_ok) goto ex_2;
                    if (T_4_1.num == true) {

  LINE(275);
                        {
                        CLUREF T_5_1;
                        sequenceOPnew2(CLU_3, &T_5_1);
                        T_5_1.vec->data[0] = STR_value_040of_040_047.num;
                        T_5_1.vec->data[1] = sel.num;
                        T_5_1.vec->data[2] = STR__047_040field.num;
                        err = c_envOPerrt(e, T_5_1, nt, t1);
                        if (err != ERR_ok) goto ex_2;
                        }
                        }
                        }/* end if */
                        goto end_2;
                        ex_2:
                            if ((err == ERR_anyize)) {

  LINE(277);
                                {
                                CLUREF T_4_1;
                                CLUREF T_4_2;
                                CLUREF T_4_3;
                                T_4_1.num = fld.vec->data[2];
                                CellAlloc(2, T_4_1.num, T_4_2);
                                err = exprOPcreate(T_4_2, nt, &T_4_3);
                                if (err != ERR_ok) goto ex_0;
                                fld.vec->data[2]  = T_4_3.num;
                                }
                            }
                            else {
                                goto ex_0;
                            }
                        end_2:;
                }
            }
            end_inline_for_2:;
        }
    }
    end_inline_for_1:;

  LINE(282);
    {
        {CLUREF T_1_1;
        sequenceOPnew2(CLU_0, &T_1_1);
        q.num = T_1_1.num;
        }
        }

  LINE(283);
    {
        {sep = STR_fields_040missing_040in_040record_057struct_040constructor_072_040;
        }
        }

  LINE(284);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
        T_1_2.num = used.array->ext_high; 
        for (T_1_1.num = used.array->ext_low; T_1_1.num <= T_1_2.num; T_1_1.num++) {
            i.num = T_1_1.num;

  LINE(285);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            if (i.num < used.array->ext_low || i.num > used.array->ext_high ) {
                err = ERR_bounds;
                goto ex_0;}
            T_2_1.num = used.array->store->data[i.num - used.array->ext_low + used.array->int_low];
            T_2_2.num = T_2_1.num ^ 1;
            if (T_2_2.num == true) {

  LINE(286);
                {
                CLUREF T_3_1;
                err = sequenceOPaddh(q, sep, &T_3_1);
                if (err != ERR_ok) goto ex_0;
                q.num = T_3_1.num;
                }

  LINE(287);
                {
                CLUREF T_3_1;
                CLUREF T_3_2;
                CLUREF T_3_3;
                if (i.num < 1 || i.num > specs.vec->size ) {
                    err = ERR_bounds;
                    goto ex_0;}
                T_3_1.num = specs.vec->data[i.num - 1];
                T_3_2.num = T_3_1.vec->data[0];
                err = sequenceOPaddh(q, T_3_2, &T_3_3);
                if (err != ERR_ok) goto ex_0;
                q.num = T_3_3.num;
                }

  LINE(288);
                {
                sep = STR__054_040;
                }
                }
                }/* end if */
        }
    }
    end_inline_for_3:;

  LINE(291);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    err = sequenceOPempty(q, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    T_1_2.num = T_1_1.num ^ 1;
    if (T_1_2.num == true) {

  LINE(292);
        {
        err = c_envOPerr(e, q);
        if (err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(293);
    {
    {
    ret_1->num = t.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_selectcons ****/


extern errcode arrayOPnew();
extern errcode arrayOPaddh();
extern errcode stringOPlt();
extern errcode arrayOPhigh();
extern errcode intOPgt();
extern errcode arrayOPstore();
extern errcode intOPsub();
extern errcode c_envOPget_struct_();
extern errcode sequenceOPa2s();
extern errcode oneofOPmake_7();
static int c_scons_sugar_own_init = 0;

/**** BEGIN PROCEDURE c_scons_sugar ****/

errcode c_scons_sugar(e, x, cons, ret_1)
CLUREF e;
CLUREF x;
CLUREF cons;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF fspecs;
    CLUREF fld;
    CLUREF t;
    CLUREF sel;
    CLUREF fs;
    CLUREF i;
    CLUREF z;
    CLUREF selt;
    CLUREF st;
    CLUREF cop;
    CLUREF nx;
    CLUREF inv;
        if (c_scons_sugar_own_init == 0) {
        stringOPcons("create", CLU_1, CLU_6, &STR_create);
        c_scons_sugar_own_init = 1;
    }
    enter_proc(296);

  LINE(298);
    {
        {CLUREF T_1_1;
        err = arrayOPnew(&T_1_1);
        if (err != ERR_ok) goto ex_0;
        fspecs.num = T_1_1.num;
        }
        }

  LINE(299);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
        T_1_1.num = cons.vec->data[0];
        T_1_3.num = T_1_1.vec->size; 
        T_1_4 = T_1_1;
        for (T_1_2.num = 1; T_1_2.num <= T_1_3.num; T_1_2.num++) {
            fld.num = T_1_4.vec->data[T_1_2.num - 1];

  LINE(300);
            {
            CLUREF T_2_1;
            T_2_1.num = fld.vec->data[0];
            err = c_envOPset_line(e, T_2_1);
            if (err != ERR_ok) goto ex_0;
            }

  LINE(301);
            {
                {CLUREF T_2_1;
                CLUREF T_2_2;
                T_2_1.num = fld.vec->data[2];
                err = c_expr(e, T_2_1, &T_2_2);
                if (err != ERR_ok) goto ex_0;
                t.num = T_2_2.num;
                }
                }

  LINE(302);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            CLUREF T_2_4;
                T_2_1.num = fld.vec->data[1];
                T_2_3.num = T_2_1.vec->size; 
                T_2_4 = T_2_1;
                for (T_2_2.num = 1; T_2_2.num <= T_2_3.num; T_2_2.num++) {
                    sel.num = T_2_4.vec->data[T_2_2.num - 1];

  LINE(303);
                    {
                        {CLUREF T_3_1;
                        RecordAlloc(2, T_3_1);
                        T_3_1.vec->data[0]  = sel.num;
                        T_3_1.vec->data[1]  = t.num;
                        fs.num = T_3_1.num;
                        }
                        }

  LINE(305);
                    {
                    {
                    if ((fspecs.array->int_low + fspecs.array->ext_size + 1) < fspecs.array->int_size) {
                        fspecs.array->store->data[fspecs.array->int_low + fspecs.array->ext_size] = fs.num;
                        fspecs.array->ext_size++; fspecs.array->ext_high++;}
                    else {
                        err = arrayOPaddh(fspecs, fs);
                        if (err != ERR_ok) goto ex_0;}
                    }
                    }

  LINE(306);
                    {
                    CLUREF T_3_1;
                    CLUREF T_3_2;
                        T_3_2.num = fspecs.array->ext_high; 
                        for (T_3_1.num = fspecs.array->ext_low; T_3_1.num <= T_3_2.num; T_3_1.num++) {
                            i.num = T_3_1.num;

  LINE(307);
                            {
                            CLUREF T_4_1;
                            CLUREF T_4_2;
                            CLUREF T_4_3;
                            if (i.num < fspecs.array->ext_low || i.num > fspecs.array->ext_high ) {
                                err = ERR_bounds;
                                goto ex_0;}
                            T_4_1.num = fspecs.array->store->data[i.num - fspecs.array->ext_low + fspecs.array->int_low];
                            T_4_2.num = T_4_1.vec->data[0];
                            err = stringOPlt(sel, T_4_2, &T_4_3);
                            if (err != ERR_ok) goto ex_0;
                            if (T_4_3.num == true) {

  LINE(308);
                                {
                                    {CLUREF T_5_1;
                                    T_5_1.num = fspecs.array->ext_high;
                                    z.num = T_5_1.num;
                                    }
                                    }

  LINE(309);
                                for (;;) {
                                    CLUREF T_5_1;
                                    T_5_1.num = (z.num > i.num)? true : false;
                                    if (T_5_1.num != true) { break; }

  LINE(310);
                                    {
                                    CLUREF T_6_1;
                                    CLUREF T_6_2;
                                    T_6_1.num = z.num - 1;
                                     if ((T_6_1.num >= 0 && z.num < 0 && (-1) < 0) || 
                                         (T_6_1.num <= 0 && z.num > 0 && (-1) > 0)) {
                                        err = ERR_overflow;
                                        goto ex_0;}
                                    if (T_6_1.num < fspecs.array->ext_low || T_6_1.num > fspecs.array->ext_high ) {
                                        err = ERR_bounds;
                                        goto ex_0;}
                                    T_6_2.num = fspecs.array->store->data[T_6_1.num - fspecs.array->ext_low + fspecs.array->int_low];
                                    {
                                    if (z.num < fspecs.array->ext_low || z.num > fspecs.array->ext_high) {
                                        err = ERR_bounds;
                                        goto ex_0;}
                                    fspecs.array->store->data[z.num + fspecs.array->int_low - fspecs.array->ext_low] = T_6_2.num;
                                    }
                                    }

  LINE(311);
                                    {
                                    CLUREF T_6_1;
                                    T_6_1.num = z.num - 1;
                                     if ((T_6_1.num >= 0 && z.num < 0 && (-1) < 0) || 
                                         (T_6_1.num <= 0 && z.num > 0 && (-1) > 0)) {
                                        err = ERR_overflow;
                                        goto ex_0;}
                                    z.num = T_6_1.num;
                                    }
                                    }
                                    end_while_1:;

  LINE(313);
                                {
                                {
                                if (i.num < fspecs.array->ext_low || i.num > fspecs.array->ext_high) {
                                    err = ERR_bounds;
                                    goto ex_0;}
                                fspecs.array->store->data[i.num + fspecs.array->int_low - fspecs.array->ext_low] = fs.num;
                                }
                                }

  LINE(314);
                                goto end_inline_for_3;
                                }
                                }/* end if */
                        }
                    }
                    end_inline_for_3:;
                }
            }
            end_inline_for_2:;
        }
    }
    end_inline_for_1:;

  LINE(319);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        CLUREF T_1_3;
        RecordAlloc(2, T_1_1);
        err = c_envOPget_struct_(e, &T_1_2);
        if (err != ERR_ok) goto ex_0;
        T_1_1.vec->data[0]  = T_1_2.num;
        err = sequenceOPa2s(fspecs, &T_1_3);
        if (err != ERR_ok) goto ex_0;
        T_1_1.vec->data[1]  = T_1_3.num;
        selt.num = T_1_1.num;
        }
        }

  LINE(321);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        CellAlloc(7, selt.num, T_1_1);
        err = c_envOPget_type(e, T_1_1, &T_1_2);
        if (err != ERR_ok) goto ex_0;
        st.num = T_1_2.num;
        }
        }

  LINE(322);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        CLUREF T_1_3;
        RecordAlloc(3, T_1_1);
        T_1_2.num = cons.vec->data[1];
        T_1_1.vec->data[2]  = T_1_2.num;
        T_1_1.vec->data[0]  = STR_create.num;
        err = sequenceOPnew(&T_1_3);
        if (err != ERR_ok) goto ex_0;
        T_1_1.vec->data[1]  = T_1_3.num;
        cop.num = T_1_1.num;
        }
        }

  LINE(325);
    {
    cons.vec->data[1]  = st.num;
    }

  LINE(326);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        CLUREF T_1_3;
        CellAlloc(20, cop.num, T_1_1);
        err = c_envOPget_unknown_type(e, &T_1_2);
        if (err != ERR_ok) goto ex_0;
        err = exprOPcreate(T_1_1, T_1_2, &T_1_3);
        if (err != ERR_ok) goto ex_0;
        nx.num = T_1_3.num;
        }
        }

  LINE(327);
    {
        {CLUREF T_1_1;
        CLUREF T_1_2;
        CLUREF T_1_3;
        CLUREF T_1_4;
        RecordAlloc(2, T_1_1);
        T_1_1.vec->data[0]  = nx.num;
        err = exprOPget_abs(x, &T_1_2);
        if (err != ERR_ok) goto ex_0;
        err = exprOPcreate(T_1_2, st, &T_1_3);
        if (err != ERR_ok) goto ex_0;
        err = sequenceOPe2s(T_1_3, &T_1_4);
        if (err != ERR_ok) goto ex_0;
        T_1_1.vec->data[1]  = T_1_4.num;
        inv.num = T_1_1.num;
        }
        }

  LINE(329);
    {
    CLUREF T_1_1;
    CellAlloc(16, inv.num, T_1_1);
    err = exprOPset_abs(x, T_1_1);
    if (err != ERR_ok) goto ex_0;
    }

  LINE(330);
    {
    {
    CLUREF T_1_1;
    err = c_xinvoke(e, inv, CLU_1, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_scons_sugar ****/


extern errcode c_envOPget_record_();
extern errcode c_envOPget_oneof_();
extern errcode c_envOPget_variant_();
static int c_select_specs_own_init = 0;

/**** BEGIN PROCEDURE c_select_specs ****/

errcode c_select_specs(e, t, ret_1)
CLUREF e;
CLUREF t;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF ta;
        if (c_select_specs_own_init == 0) {
        stringOPcons("constructor has illegal type_spec: ", CLU_1, CLU_35, &STR_constructor_040has_040illegal_040type_137spec_072_040);
        c_select_specs_own_init = 1;
    }
    enter_proc(333);

  LINE(335);
    {
    CLUREF T_1_1;
    err = typespecOPget_abs(t, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    switch (T_1_1.cell->tag) {
    case 7: 
         {CLUREF T_1_2;
        T_1_2.num = T_1_1.cell->value;
        ta.num = T_1_2.num;

  LINE(337);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            CLUREF T_2_3;
            CLUREF T_2_4;
            CLUREF T_2_5;
            CLUREF T_2_6;
            CLUREF T_2_7;
            T_2_2.num = ta.vec->data[0];
            err = c_envOPget_record_(e, &T_2_3);
            if (err != ERR_ok) goto ex_0;
            err = duOPequal(T_2_2, T_2_3, &T_2_4);
            if (err != ERR_ok) goto ex_0;
            T_2_1.num = T_2_4.num;
            if (!T_2_4.num) {
                T_2_5.num = ta.vec->data[0];
                err = c_envOPget_struct_(e, &T_2_6);
                if (err != ERR_ok) goto ex_0;
                err = duOPequal(T_2_5, T_2_6, &T_2_7);
                if (err != ERR_ok) goto ex_0;
                T_2_1.num = T_2_7.num;
            }
            if (T_2_1.num == true) {

  LINE(338);
                {
                {
                CLUREF T_3_1;
                T_3_1.num = ta.vec->data[1];
                ret_1->num = T_3_1.num;
                }
                {signal (ERR_ok);}}
                }
            else {
            CLUREF T_2_8;
            CLUREF T_2_9;
            CLUREF T_2_10;
            CLUREF T_2_11;
            CLUREF T_2_12;
            CLUREF T_2_13;
            CLUREF T_2_14;
            CLUREF T_2_15;
            CLUREF T_2_16;
            T_2_9.num = ta.vec->data[0];
            err = c_envOPget_oneof_(e, &T_2_10);
            if (err != ERR_ok) goto ex_0;
            err = duOPequal(T_2_9, T_2_10, &T_2_11);
            if (err != ERR_ok) goto ex_0;
            T_2_12.num = T_2_11.num ^ 1;
            T_2_8.num = T_2_12.num;
            if (T_2_12.num) {
                T_2_13.num = ta.vec->data[0];
                err = c_envOPget_variant_(e, &T_2_14);
                if (err != ERR_ok) goto ex_0;
                err = duOPequal(T_2_13, T_2_14, &T_2_15);
                if (err != ERR_ok) goto ex_0;
                T_2_16.num = T_2_15.num ^ 1;
                T_2_8.num = T_2_16.num;
            }
            if (T_2_8.num == true) {

  LINE(340);
                {
                {signal (ERR_abstract);}}
                }
                }}/* end if */
            break;
            }
    case 9: 
         {

  LINE(342);
            {
            {
            CLUREF T_2_1;
            err = sequenceOPnew(&T_2_1);
            if (err != ERR_ok) goto ex_0;
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    default: {

  LINE(344);
        {
        CLUREF T_2_1;
        err = c_envOPis_hacked(e, &T_2_1);
        if (err != ERR_ok) goto ex_0;
        if (T_2_1.num == true) {

  LINE(345);
            {
            {signal (ERR_abstract);}}
            }
            }/* end if */
    }
    }
    }

  LINE(347);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    sequenceOPnew2(CLU_2, &T_1_1);
    T_1_1.vec->data[0] = STR_constructor_040has_040illegal_040type_137spec_072_040.num;
    err = get_type_print(t, &T_1_2);
    if (err != ERR_ok) goto ex_0;
    T_1_1.vec->data[1] = T_1_2.num;
    err = c_envOPerr(e, T_1_1);
    if (err != ERR_ok) goto ex_0;
    }

  LINE(349);
    {
    {
    CLUREF T_1_1;
    err = sequenceOPnew(&T_1_1);
    if (err != ERR_ok) goto ex_0;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_select_specs ****/


extern errcode stringOPequal();
CLUREF STR_duplicate_040selector_040_047;
CLUREF STR__047_040not_040a_040legal_040selector;
static int c_sel_own_init = 0;

/**** BEGIN PROCEDURE c_sel ****/

errcode c_sel(e, specs, used, n, ret_1)
CLUREF e;
CLUREF specs;
CLUREF used;
CLUREF n;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF i;
    CLUREF spec;
        if (c_sel_own_init == 0) {
        stringOPcons("duplicate selector \'", CLU_1, CLU_20, &STR_duplicate_040selector_040_047);
        stringOPcons("\'", CLU_1, CLU_1, &STR__047);
        stringOPcons("\' not a legal selector", CLU_1, CLU_22, &STR__047_040not_040a_040legal_040selector);
        c_sel_own_init = 1;
    }
    enter_proc(352);

  LINE(354);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
        T_1_2.num = specs.vec->size; 
        for (T_1_1.num = 1; T_1_1.num <= T_1_2.num; T_1_1.num++) {
            i.num = T_1_1.num;

  LINE(355);
            {
                {CLUREF T_2_1;
                if (i.num < 1 || i.num > specs.vec->size ) {
                    err = ERR_bounds;
                    goto ex_0;}
                T_2_1.num = specs.vec->data[i.num - 1];
                spec.num = T_2_1.num;
                }
                }

  LINE(356);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            T_2_1.num = spec.vec->data[0];
            T_2_2.num = ((n.str->size != T_2_1.str->size)? false :
                !(bcmp(n.str->data, T_2_1.str->data, n.str->size)));
            if (T_2_2.num == true) {

  LINE(357);
                {
                CLUREF T_3_1;
                if (i.num < used.array->ext_low || i.num > used.array->ext_high ) {
                    err = ERR_bounds;
                    goto ex_0;}
                T_3_1.num = used.array->store->data[i.num - used.array->ext_low + used.array->int_low];
                if (T_3_1.num == true) {

  LINE(358);
                    {
                    CLUREF T_4_1;
                    sequenceOPnew2(CLU_3, &T_4_1);
                    T_4_1.vec->data[0] = STR_duplicate_040selector_040_047.num;
                    T_4_1.vec->data[1] = n.num;
                    T_4_1.vec->data[2] = STR__047.num;
                    err = c_envOPerr(e, T_4_1);
                    if (err != ERR_ok) goto ex_0;
                    }
                    }
                else {

  LINE(359);
                    {
                    {
                    if (i.num < used.array->ext_low || i.num > used.array->ext_high) {
                        err = ERR_bounds;
                        goto ex_0;}
                    used.array->store->data[i.num + used.array->int_low - used.array->ext_low] = true;
                    }
                    }
                    }}/* end if */

  LINE(361);
                {
                {
                CLUREF T_3_1;
                T_3_1.num = spec.vec->data[1];
                ret_1->num = T_3_1.num;
                }
                {signal (ERR_ok);}}
                }
                }/* end if */
        }
    }
    end_inline_for_1:;

  LINE(364);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    err = sequenceOPempty(specs, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    T_1_2.num = T_1_1.num ^ 1;
    if (T_1_2.num == true) {

  LINE(365);
        {
        CLUREF T_2_1;
        sequenceOPnew2(CLU_3, &T_2_1);
        T_2_1.vec->data[0] = STR__047.num;
        T_2_1.vec->data[1] = n.num;
        T_2_1.vec->data[2] = STR__047_040not_040a_040legal_040selector.num;
        err = c_envOPerr(e, T_2_1);
        if (err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(366);
    {
    {
    CLUREF T_1_1;
    err = c_envOPget_unknown_type(e, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_sel ****/


extern errcode c_constlist();

/**** BEGIN PROCEDURE c_clusterop ****/

errcode c_clusterop(e, op, ret_1)
CLUREF e;
CLUREF op;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    enter_proc(369);

  LINE(370);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = op.vec->data[2];
    err = c_type(e, T_1_1, &T_1_2);
    if (err != ERR_ok) goto ex_0;
    op.vec->data[2]  = T_1_2.num;
    }

  LINE(371);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = op.vec->data[1];
    err = c_constlist(e, T_1_1, &T_1_2);
    if (err != ERR_ok) goto ex_0;
    op.vec->data[1]  = T_1_2.num;
    }

  LINE(372);
    {
    {
    CLUREF T_1_1;
    err = c_clusterop1(e, op, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_clusterop ****/


extern errcode c_cluster_op();
extern errcode c_select_op();
extern errcode c_idn_op();
extern errcode c_apply_op();
extern errcode oneofOPis_3();
extern errcode oneofOPmake_6();
extern errcode get_clusterop_print();
CLUREF STR__047_040does_040not_040exist;
CLUREF STR_type_040_047any_047_040has_040no_040operations;
static int c_clusterop1_own_init = 0;

/**** BEGIN PROCEDURE c_clusterop1 ****/

errcode c_clusterop1(e, op, ret_1)
CLUREF e;
CLUREF op;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF ta;
        if (c_clusterop1_own_init == 0) {
        stringOPcons("\'", CLU_1, CLU_1, &STR__047);
        stringOPcons("\' does not exist", CLU_1, CLU_16, &STR__047_040does_040not_040exist);
        stringOPcons("type \'any\' has no operations", CLU_1, CLU_28, &STR_type_040_047any_047_040has_040no_040operations);
        c_clusterop1_own_init = 1;
    }
    enter_proc(375);

  LINE(376);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = op.vec->data[2];
    err = typespecOPget_abs(T_1_1, &T_1_2);
    if (err != ERR_ok) goto ex_0;
    switch (T_1_2.cell->tag) {
    case 3: 
         {CLUREF T_1_3;
        T_1_3.num = T_1_2.cell->value;
        ta.num = T_1_3.num;

  LINE(378);
            {
            {
            CLUREF T_2_1;
            err = c_cluster_op(e, ta, op, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 7: 
         {CLUREF T_1_4;
        T_1_4.num = T_1_2.cell->value;
        ta.num = T_1_4.num;

  LINE(380);
            {
            {
            CLUREF T_2_1;
            err = c_select_op(e, ta, op, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 5: 
         {CLUREF T_1_5;
        T_1_5.num = T_1_2.cell->value;
        ta.num = T_1_5.num;

  LINE(382);
            {
            {
            CLUREF T_2_1;
            err = c_idn_op(e, ta, op, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 2: 
         {CLUREF T_1_6;
        T_1_6.num = T_1_2.cell->value;
        ta.num = T_1_6.num;

  LINE(384);
            {
            {
            CLUREF T_2_1;
            err = c_apply_op(e, ta, op, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    case 6: 
         {CLUREF T_1_7;
        T_1_7.num = T_1_2.cell->value;
        ta.num = T_1_7.num;

  LINE(386);
            {
            CLUREF T_2_1;
            if (ta.cell->tag == 3) T_2_1.num = true; else T_2_1.num = false;
            if (T_2_1.num == true) {

  LINE(387);
                {
                {
                CLUREF T_3_1;
                CLUREF T_3_2;
                CLUREF T_3_3;
                CellAlloc(2, op.num, T_3_1);
                CellAlloc(6, T_3_1.num, T_3_2);
                err = c_envOPget_type(e, T_3_2, &T_3_3);
                if (err != ERR_ok) goto ex_0;
                ret_1->num = T_3_3.num;
                }
                {signal (ERR_ok);}}
                }
            else {

  LINE(389);
                {
                CLUREF T_3_1;
                CLUREF T_3_2;
                sequenceOPnew2(CLU_3, &T_3_1);
                T_3_1.vec->data[0] = STR__047.num;
                err = get_clusterop_print(op, &T_3_2);
                if (err != ERR_ok) goto ex_0;
                T_3_1.vec->data[1] = T_3_2.num;
                T_3_1.vec->data[2] = STR__047_040does_040not_040exist.num;
                err = c_envOPerr(e, T_3_1);
                if (err != ERR_ok) goto ex_0;
                }
                }}/* end if */
            break;
            }
    case 1: 
         {

  LINE(393);
            {
            err = c_envOPerr1(e, STR_type_040_047any_047_040has_040no_040operations);
            if (err != ERR_ok) goto ex_0;
            }
            break;
            }
    case 8: 
         {CLUREF T_1_8;
        T_1_8.num = T_1_2.cell->value;
        ta.num = T_1_8.num;

  LINE(395);
            {
            {
            CLUREF T_2_1;
            err = c_cluster_op(e, ta, op, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            ret_1->num = T_2_1.num;
            }
            {signal (ERR_ok);}}
            break;
            }
    default: {
    }
    }
    }

  LINE(398);
    {
    {
    CLUREF T_1_1;
    err = c_envOPget_unknown_type(e, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    ret_1->num = T_1_1.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE c_clusterop1 ****/

