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

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


/**** BEGIN CLUSTER typ ****/

extern errcode sequenceOPnew();
extern errcode sequenceOPelements();
extern errcode typOPfix_type();
extern errcode recordOPget_1();
extern errcode idnOPset_kind();
extern errcode oneofOPmake_9();
extern errcode recordOPget_2();
extern errcode sequenceOPaddh();
extern errcode typOPfix_own_type();
extern errcode oneofOPmake_4();
extern errcode typOPfix_parm_type();
extern errcode typespecOPget_abs();
extern errcode oneofOPmake_6();
extern errcode oneofOPmake_10();
extern errcode compiler_logit();
extern errcode typespec_print();
extern errcode oneofOPmake_8();
CLUREF STR_not_040fixing_040each_137idn_056str;
static int typ_own_init = 0;
OWN_req typ_ownreqs = {0,0};
CLUREF typOPundo_global_idn_type_list;
CLUREF typOPundo_local_idn_type_list;
errcode typ_own_init_proc()
{
    errcode err;
    enter_own_init_proc();
        if (typ_own_init == 0) {
        stringOPcons("not fixing each_idn.str", CLU_1, CLU_23, &STR_not_040fixing_040each_137idn_056str);
        typ_own_init = 1;
        {
            {CLUREF T_0_1;
            err = sequenceOPnew(&T_0_1);
            if (err != ERR_ok) goto ex_0;
            typOPundo_global_idn_type_list.num = T_0_1.num;
            }
            }
        {
            {CLUREF T_0_2;
            err = sequenceOPnew(&T_0_2);
            if (err != ERR_ok) goto ex_0;
            typOPundo_local_idn_type_list.num = T_0_2.num;
            }
            }
        {signal(ERR_ok);}
    ex_0: pclu_unhandled(err); {signal(ERR_failure);}
        }
    }


/**** BEGIN PROCEDURE begin_local_idn_types ****/

errcode typOPbegin_local_idn_types()
    {
    errcode err;
    errcode ecode2;
        if (typ_own_init == 0) {
            err = typ_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
    enter_proc(15);

  LINE(17);
    {
    typOPundo_global_idn_type_list.num = typOPundo_local_idn_type_list.num;
    }

  LINE(18);
    {
    CLUREF T_1_1;
    err = sequenceOPnew(&T_1_1);
    if (err != ERR_ok) goto ex_0;
    typOPundo_local_idn_type_list.num = T_1_1.num;
    }
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE begin_local_idn_types ****/


/**** BEGIN PROCEDURE fix_typelist ****/

errcode typOPfix_typelist(d)
CLUREF d;
    {
    errcode err;
    errcode ecode2;
    CLUREF each_d;
        if (typ_own_init == 0) {
            err = typ_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
    enter_proc(22);

  LINE(24);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
        T_1_2.num = d.vec->size; 
        T_1_3 = d;
        for (T_1_1.num = 1; T_1_1.num <= T_1_2.num; T_1_1.num++) {
            each_d.num = T_1_3.vec->data[T_1_1.num - 1];

  LINE(25);
            {
            err = typOPfix_type(each_d);
            if (err != ERR_ok) goto ex_0;
            }
        }
    }
    end_inline_for_1:;
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE fix_typelist ****/


/**** BEGIN PROCEDURE fix_type ****/

errcode typOPfix_type(d)
CLUREF d;
    {
    errcode err;
    errcode ecode2;
    CLUREF each_idn;
        if (typ_own_init == 0) {
            err = typ_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
    enter_proc(30);

  LINE(32);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
        T_1_1.num = d.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++) {
            each_idn.num = T_1_4.vec->data[T_1_2.num - 1];

  LINE(33);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            T_2_1.num = d.vec->data[1];
            CellAlloc(9, T_2_1.num, T_2_2);
            err = idnOPset_kind(each_idn, T_2_2);
            if (err != ERR_ok) goto ex_0;
            }

  LINE(34);
            {
            CLUREF T_2_1;
            err = sequenceOPaddh(typOPundo_local_idn_type_list, each_idn, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            typOPundo_local_idn_type_list.num = T_2_1.num;
            }
        }
    }
    end_inline_for_1:;
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE fix_type ****/


/**** BEGIN PROCEDURE fix_own_typelist ****/

errcode typOPfix_own_typelist(d)
CLUREF d;
    {
    errcode err;
    errcode ecode2;
    CLUREF each_d;
        if (typ_own_init == 0) {
            err = typ_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
    enter_proc(39);

  LINE(41);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
        T_1_2.num = d.vec->size; 
        T_1_3 = d;
        for (T_1_1.num = 1; T_1_1.num <= T_1_2.num; T_1_1.num++) {
            each_d.num = T_1_3.vec->data[T_1_1.num - 1];

  LINE(42);
            {
            err = typOPfix_own_type(each_d);
            if (err != ERR_ok) goto ex_0;
            }
        }
    }
    end_inline_for_1:;
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE fix_own_typelist ****/


/**** BEGIN PROCEDURE fix_own_type ****/

errcode typOPfix_own_type(d)
CLUREF d;
    {
    errcode err;
    errcode ecode2;
    CLUREF each_idn;
        if (typ_own_init == 0) {
            err = typ_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
    enter_proc(47);

  LINE(49);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
        T_1_1.num = d.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++) {
            each_idn.num = T_1_4.vec->data[T_1_2.num - 1];

  LINE(50);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            T_2_1.num = d.vec->data[1];
            CellAlloc(4, T_2_1.num, T_2_2);
            err = idnOPset_kind(each_idn, T_2_2);
            if (err != ERR_ok) goto ex_0;
            }

  LINE(51);
            {
            CLUREF T_2_1;
            err = sequenceOPaddh(typOPundo_local_idn_type_list, each_idn, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            typOPundo_local_idn_type_list.num = T_2_1.num;
            }
        }
    }
    end_inline_for_1:;
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE fix_own_type ****/


/**** BEGIN PROCEDURE fix_parm_typelist ****/

errcode typOPfix_parm_typelist(d)
CLUREF d;
    {
    errcode err;
    errcode ecode2;
    CLUREF each_d;
        if (typ_own_init == 0) {
            err = typ_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
    enter_proc(56);

  LINE(58);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
        T_1_2.num = d.vec->size; 
        T_1_3 = d;
        for (T_1_1.num = 1; T_1_1.num <= T_1_2.num; T_1_1.num++) {
            each_d.num = T_1_3.vec->data[T_1_1.num - 1];

  LINE(59);
            {
            err = typOPfix_parm_type(each_d);
            if (err != ERR_ok) goto ex_0;
            }
        }
    }
    end_inline_for_1:;
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE fix_parm_typelist ****/

static int typOPfix_parm_type_own_init = 0;

/**** BEGIN PROCEDURE fix_parm_type ****/

errcode typOPfix_parm_type(d)
CLUREF d;
    {
    errcode err;
    errcode ecode2;
    CLUREF each_idn;
        if (typOPfix_parm_type_own_init == 0) {
        if (typ_own_init == 0) {
            err = typ_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
        typOPfix_parm_type_own_init = 1;
    }
    enter_proc(64);

  LINE(66);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
        T_1_1.num = d.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++) {
            each_idn.num = T_1_4.vec->data[T_1_2.num - 1];

  LINE(67);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            T_2_1.num = d.vec->data[1];
            err = typespecOPget_abs(T_2_1, &T_2_2);
            if (err != ERR_ok) goto ex_0;
            switch (T_2_2.cell->tag) {
            case 8: 
                 {

  LINE(69);
                    {
                    CLUREF T_3_1;
                    CLUREF T_3_2;
                    err = sequenceOPnew(&T_3_1);
                    if (err != ERR_ok) goto ex_0;
                    CellAlloc(6, T_3_1.num, T_3_2);
                    err = idnOPset_kind(each_idn, T_3_2);
                    if (err != ERR_ok) goto ex_0;
                    }
                    break;
                    }
            case 3: 
                 {

  LINE(71);
                    {
                    CLUREF T_3_1;
                    CLUREF T_3_2;
                    T_3_1.num = d.vec->data[1];
                    CellAlloc(10, T_3_1.num, T_3_2);
                    err = idnOPset_kind(each_idn, T_3_2);
                    if (err != ERR_ok) goto ex_0;
                    }
                    break;
                    }
            default: {

  LINE(73);
                {
                CLUREF T_3_1;
                CLUREF T_3_2;
                T_3_1.num = 720;
                err = compiler_logit(T_3_1, STR_not_040fixing_040each_137idn_056str, &T_3_2);
                if (err != ERR_ok) goto ex_0;
                }

  LINE(74);
                {
                CLUREF T_3_1;
                T_3_1.num = d.vec->data[1];
                err = typespec_print(T_3_1);
                if (err != ERR_ok) goto ex_0;
                }
            }
            }
            }

  LINE(76);
            {
            CLUREF T_2_1;
            err = sequenceOPaddh(typOPundo_local_idn_type_list, each_idn, &T_2_1);
            if (err != ERR_ok) goto ex_0;
            typOPundo_local_idn_type_list.num = T_2_1.num;
            }
        }
    }
    end_inline_for_1:;
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE fix_parm_type ****/


/**** BEGIN PROCEDURE undo_local_idn_types ****/

errcode typOPundo_local_idn_types()
    {
    errcode err;
    errcode ecode2;
    CLUREF this_idn;
        if (typ_own_init == 0) {
            err = typ_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
    enter_proc(81);

  LINE(83);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
        T_1_2.num = typOPundo_local_idn_type_list.vec->size; 
        T_1_3 = typOPundo_local_idn_type_list;
        for (T_1_1.num = 1; T_1_1.num <= T_1_2.num; T_1_1.num++) {
            this_idn.num = T_1_3.vec->data[T_1_1.num - 1];

  LINE(84);
            {
            CLUREF T_2_1;
            CellAlloc(8, nil, T_2_1);
            err = idnOPset_kind(this_idn, T_2_1);
            if (err != ERR_ok) goto ex_0;
            }
        }
    }
    end_inline_for_1:;

  LINE(86);
    {
    CLUREF T_1_1;
    err = sequenceOPnew(&T_1_1);
    if (err != ERR_ok) goto ex_0;
    typOPundo_local_idn_type_list.num = T_1_1.num;
    }
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE undo_local_idn_types ****/


/**** BEGIN PROCEDURE undo_global_idn_types ****/

errcode typOPundo_global_idn_types()
    {
    errcode err;
    errcode ecode2;
    CLUREF this_idn;
        if (typ_own_init == 0) {
            err = typ_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
    enter_proc(89);

  LINE(91);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
        T_1_2.num = typOPundo_global_idn_type_list.vec->size; 
        T_1_3 = typOPundo_global_idn_type_list;
        for (T_1_1.num = 1; T_1_1.num <= T_1_2.num; T_1_1.num++) {
            this_idn.num = T_1_3.vec->data[T_1_1.num - 1];

  LINE(92);
            {
            CLUREF T_2_1;
            CellAlloc(8, nil, T_2_1);
            err = idnOPset_kind(this_idn, T_2_1);
            if (err != ERR_ok) goto ex_0;
            }
        }
    }
    end_inline_for_1:;

  LINE(94);
    {
    CLUREF T_1_1;
    err = sequenceOPnew(&T_1_1);
    if (err != ERR_ok) goto ex_0;
    typOPundo_global_idn_type_list.num = T_1_1.num;
    }
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE undo_global_idn_types ****/

typedef struct{
    int count;
    OWNPTR type_owns;
    OWNPTR op_owns;
    struct OP_ENTRY entry[9];
} typ_OPS;

CLU_proc typ_oe_begin_local_idn_types = {{0,0,0,0}, typOPbegin_local_idn_types, 0};
CLU_proc typ_oe_fix_own_type = {{0,0,0,0}, typOPfix_own_type, 0};
CLU_proc typ_oe_fix_own_typelist = {{0,0,0,0}, typOPfix_own_typelist, 0};
CLU_proc typ_oe_fix_parm_type = {{0,0,0,0}, typOPfix_parm_type, 0};
CLU_proc typ_oe_fix_parm_typelist = {{0,0,0,0}, typOPfix_parm_typelist, 0};
CLU_proc typ_oe_fix_type = {{0,0,0,0}, typOPfix_type, 0};
CLU_proc typ_oe_fix_typelist = {{0,0,0,0}, typOPfix_typelist, 0};
CLU_proc typ_oe_undo_global_idn_types = {{0,0,0,0}, typOPundo_global_idn_types, 0};
CLU_proc typ_oe_undo_local_idn_types = {{0,0,0,0}, typOPundo_local_idn_types, 0};

typ_OPS typ_ops_actual = {9, (OWNPTR)&typ_own_init, (OWNPTR)&typ_own_init, {
    {&typ_oe_begin_local_idn_types, "begin_local_idn_types"},
    {&typ_oe_fix_own_type, "fix_own_type"},
    {&typ_oe_fix_own_typelist, "fix_own_typelist"},
    {&typ_oe_fix_parm_type, "fix_parm_type"},
    {&typ_oe_fix_parm_typelist, "fix_parm_typelist"},
    {&typ_oe_fix_type, "fix_type"},
    {&typ_oe_fix_typelist, "fix_typelist"},
    {&typ_oe_undo_global_idn_types, "undo_global_idn_types"},
    {&typ_oe_undo_local_idn_types, "undo_local_idn_types"}}};

struct OPS *typ_ops = (struct OPS *)&typ_ops_actual;

/**** END CLUSTER typ ****/

/**** BEGIN CLUSTER sig ****/

extern errcode arrayOPnew();
extern errcode sigOPlookup();
extern errcode stringOPconcat();
extern errcode stringOPequal();
extern errcode boolOPequal();
extern errcode sigOPinit_known();
extern errcode arrayOPelements();
extern errcode arrayOPindexes();
extern errcode arrayOPfetch();
extern errcode intOPsub();
extern errcode err_name();
extern errcode streamOPopen();
extern errcode streamOPgetl();
extern errcode stringOPindexs();
extern errcode intOPequal();
extern errcode intOPlt();
extern errcode stringOPrest();
extern errcode intOPmin();
extern errcode arrayOPaddh();
extern errcode stringOPsubstr();
CLUREF STR_ERR_137;
CLUREF STR_ok;
CLUREF STR__042ERR_137ok_137UNIQ_042;
CLUREF STR__042ERR_137;
CLUREF STR__042;
CLUREF STR_ok_137UNIQ;
CLUREF STR_read;
CLUREF STR__043define;
CLUREF STR__040;
CLUREF STR__011;
static int sig_own_init = 0;
OWN_req sig_ownreqs = {0,0};
CLUREF sigOPknown;
CLUREF sigOPinit;
errcode sig_own_init_proc()
{
    errcode err;
    enter_own_init_proc();
        if (sig_own_init == 0) {
        stringOPcons("ERR_", CLU_1, CLU_4, &STR_ERR_137);
        stringOPcons("ok", CLU_1, CLU_2, &STR_ok);
        stringOPcons("\"ERR_ok_UNIQ\"", CLU_1, CLU_13, &STR__042ERR_137ok_137UNIQ_042);
        stringOPcons("\"ERR_", CLU_1, CLU_5, &STR__042ERR_137);
        stringOPcons("\"", CLU_1, CLU_1, &STR__042);
        stringOPcons("ok_UNIQ", CLU_1, CLU_7, &STR_ok_137UNIQ);
        stringOPcons("read", CLU_1, CLU_4, &STR_read);
        stringOPcons("#define", CLU_1, CLU_7, &STR__043define);
        stringOPcons(" ", CLU_1, CLU_1, &STR__040);
        stringOPcons("\t", CLU_1, CLU_1, &STR__011);
        sig_own_init = 1;
        {
            {CLUREF T_0_1;
            err = arrayOPnew(&T_0_1);
            if (err != ERR_ok) goto ex_0;
            sigOPknown.num = T_0_1.num;
            }
            }
        {
            {sigOPinit.tf = false;
            }
            }
        {signal(ERR_ok);}
    ex_0: pclu_unhandled(err); {signal(ERR_failure);}
        }
    }

static int sigOPname_own_init = 0;

/**** BEGIN PROCEDURE name ****/

errcode sigOPname(n, ret_1)
CLUREF n;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
        if (sigOPname_own_init == 0) {
        if (sig_own_init == 0) {
            err = sig_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
        sigOPname_own_init = 1;
    }
    enter_proc(111);

  LINE(113);
    {
    CLUREF T_1_1;
    err = sigOPlookup(n, &T_1_1);
    if (err != ERR_ok) goto ex_0;
    if (T_1_1.num == true) {

  LINE(115);
        {
        {
        CLUREF T_2_1;
        err = stringOPconcat(STR_ERR_137, n, &T_2_1);
        if (err != ERR_ok) goto ex_0;
        ret_1->num = T_2_1.num;
        }
        {signal (ERR_ok);}}
        }
    else {

  LINE(117);
        {
        CLUREF T_2_1;
        T_2_1.num = ((n.str->size != STR_ok.str->size)? false :
            !(bcmp(n.str->data, STR_ok.str->data, n.str->size)));
        if (T_2_1.num == true) {

  LINE(119);
            {
            {
            ret_1->str = STR__042ERR_137ok_137UNIQ_042.str;
            }
            {signal (ERR_ok);}}
            }
        else {

  LINE(121);
            {
            {
            CLUREF T_3_1;
            CLUREF T_3_2;
            err = stringOPconcat(STR__042ERR_137, n, &T_3_1);
            if (err != ERR_ok) goto ex_0;
            err = stringOPconcat(T_3_1, STR__042, &T_3_2);
            if (err != ERR_ok) goto ex_0;
            ret_1->num = T_3_2.num;
            }
            {signal (ERR_ok);}}
            }}/* end if */
        }}/* 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 name ****/

static int sigOPlookup_own_init = 0;

/**** BEGIN PROCEDURE lookup ****/

errcode sigOPlookup(n, ret_1)
CLUREF n;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF each_s;
        if (sigOPlookup_own_init == 0) {
        if (sig_own_init == 0) {
            err = sig_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
        sigOPlookup_own_init = 1;
    }
    enter_proc(126);

  LINE(128);
    {
    CLUREF T_1_1;
    T_1_1.num = (sigOPinit.tf == false)? true : false;
    if (T_1_1.num == true) {
        {
        err = sigOPinit_known();
        if (err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(129);
    {
    CLUREF T_1_1;
    T_1_1.num = ((n.str->size != STR_ok.str->size)? false :
        !(bcmp(n.str->data, STR_ok.str->data, n.str->size)));
    if (T_1_1.num == true) {
        {
        n = STR_ok_137UNIQ;
        }
        }
        }/* end if */

  LINE(130);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
        T_1_2.num = sigOPknown.array->ext_high; 
        T_1_3 = sigOPknown;
        for (T_1_1.num = sigOPknown.array->ext_low; T_1_1.num <= T_1_2.num; T_1_1.num++) {
            if (T_1_1.num > T_1_3.array->ext_high || T_1_1.num < T_1_3.array->ext_low) {
                err = ERR_failure;
                elist[0].str = array_bounds_exception_STRING;
                goto ex_0;}
            each_s.num = T_1_3.array->store->data[T_1_1.num - T_1_3.array->ext_low + T_1_3.array->int_low];

  LINE(131);
            {
            CLUREF T_2_1;
            T_2_1.num = ((n.str->size != each_s.str->size)? false :
                !(bcmp(n.str->data, each_s.str->data, n.str->size)));
            if (T_2_1.num == true) {
                {
                {
                ret_1->tf = true;
                }
                {signal (ERR_ok);}}
                }
                }/* end if */
        }
    }
    end_inline_for_1:;

  LINE(133);
    {
    {
    ret_1->tf = false;
    }
    {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 lookup ****/

static int sigOPindex_own_init = 0;

/**** BEGIN PROCEDURE index ****/

errcode sigOPindex(n, ret_1)
CLUREF n;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
    CLUREF i;
        if (sigOPindex_own_init == 0) {
        if (sig_own_init == 0) {
            err = sig_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
        sigOPindex_own_init = 1;
    }
    enter_proc(137);

  LINE(139);
    {
    CLUREF T_1_1;
    T_1_1.num = (sigOPinit.tf == false)? true : false;
    if (T_1_1.num == true) {
        {
        err = sigOPinit_known();
        if (err != ERR_ok) goto ex_0;
        }
        }
        }/* end if */

  LINE(140);
    {
    CLUREF T_1_1;
    T_1_1.num = ((n.str->size != STR_ok.str->size)? false :
        !(bcmp(n.str->data, STR_ok.str->data, n.str->size)));
    if (T_1_1.num == true) {
        {
        n = STR_ok_137UNIQ;
        }
        }
        }/* end if */

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

  LINE(142);
            {
            CLUREF T_2_1;
            CLUREF T_2_2;
            if (i.num < sigOPknown.array->ext_low || i.num > sigOPknown.array->ext_high ) {
                err = ERR_bounds;
                goto ex_0;}
            T_2_1.num = sigOPknown.array->store->data[i.num - sigOPknown.array->ext_low + sigOPknown.array->int_low];
            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) {
                {
                {
                CLUREF T_3_1;
                T_3_1.num = i.num - 1;
                 if ((T_3_1.num >= 0 && i.num < 0 && (-1) < 0) || 
                     (T_3_1.num <= 0 && i.num > 0 && (-1) > 0)) {
                    err = ERR_overflow;
                    goto ex_0;}
                ret_1->num = T_3_1.num;
                }
                {signal (ERR_ok);}}
                }
                }/* end if */
        }
    }
    end_inline_for_1:;

  LINE(144);
    {
    {signal (ERR_not_found);}}
    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 index ****/

static int sigOPinit_known_own_init = 0;

/**** BEGIN PROCEDURE init_known ****/

errcode sigOPinit_known()
    {
    errcode err;
    errcode ecode2;
    CLUREF err_file_name;
    CLUREF err_stream;
    CLUREF l;
    CLUREF pos;
    CLUREF pos2;
    CLUREF l2;
    CLUREF pos3;
    CLUREF pos4;
        if (sigOPinit_known_own_init == 0) {
        if (sig_own_init == 0) {
            err = sig_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
        sigOPinit_known_own_init = 1;
    }
    enter_proc(147);

  LINE(149);
    {
    sigOPinit.tf = true;
    }

  LINE(151);
    {
        {CLUREF T_1_1;
        err = err_name(&T_1_1);
        if (err != ERR_ok) goto ex_0;
        err_file_name.num = T_1_1.num;
        }
        }

  LINE(153);
    {
        {CLUREF T_2_1;
        err = streamOPopen(err_file_name, STR_read, &T_2_1);
        if (err != ERR_ok) goto ex_1;
        err_stream.num = T_2_1.num;
        }
        }
        goto end_1;
        ex_1:
            {

  LINE(154);
                {
                {signal (ERR_ok);}}
            }
        end_1:;

  LINE(156);
    for (;;) {
        if (true != true) { break; }

  LINE(157);
        {
            {CLUREF T_3_1;
            err = streamOPgetl(err_stream, &T_3_1);
            if (err != ERR_ok) goto ex_2;
            l.num = T_3_1.num;
            }
            }

  LINE(158);
        {
            {CLUREF T_3_1;
            err = stringOPindexs(STR__043define, l, &T_3_1);
            if (err != ERR_ok) goto ex_2;
            pos.num = T_3_1.num;
            }
            }

  LINE(159);
        {
        CLUREF T_3_1;
        T_3_1.num = (pos.num == 0)? true : false;
        if (T_3_1.num == true) {
            continue;
            }
            }/* end if */

  LINE(160);
        {
            {CLUREF T_3_1;
            err = stringOPindexs(STR_ERR_137, l, &T_3_1);
            if (err != ERR_ok) goto ex_2;
            pos2.num = T_3_1.num;
            }
            }

  LINE(161);
        {
        CLUREF T_3_1;
        T_3_1.num = (pos2.num < pos.num)? true : false;
        if (T_3_1.num == true) {
            continue;
            }
            }/* end if */

  LINE(162);
        {
            {CLUREF T_3_1;
            err = stringOPrest(l, pos2, &T_3_1);
            if (err != ERR_ok) goto ex_2;
            l2.num = T_3_1.num;
            }
            }

  LINE(163);
        {
            {CLUREF T_3_1;
            err = stringOPindexs(STR__040, l2, &T_3_1);
            if (err != ERR_ok) goto ex_2;
            pos3.num = T_3_1.num;
            }
            }

  LINE(164);
        {
            {CLUREF T_3_1;
            err = stringOPindexs(STR__011, l2, &T_3_1);
            if (err != ERR_ok) goto ex_2;
            pos4.num = T_3_1.num;
            }
            }

  LINE(165);
        {
        CLUREF T_3_1;
        T_3_1.num = (pos4.num == 0)? true : false;
        if (T_3_1.num == true) {
            {
            pos4.num = pos3.num;
            }
            }
            }/* end if */

  LINE(166);
        {
        CLUREF T_3_1;
        T_3_1.num = (pos3.num == 0)? true : false;
        if (T_3_1.num == true) {
            {
            pos3.num = pos4.num;
            }
            }
            }/* end if */

  LINE(167);
        {
        CLUREF T_3_1;
        T_3_1.num = (pos3.num == 0)? true : false;
        if (T_3_1.num == true) {
            continue;
            }
            }/* end if */

  LINE(168);
        {
        CLUREF T_3_1;
        err = intOPmin(pos3, pos4, &T_3_1);
        if (err != ERR_ok) goto ex_2;
        pos3.num = T_3_1.num;
        }

  LINE(169);
        {
        CLUREF T_3_1;
        CLUREF T_3_2;
        T_3_1.num = pos3.num - 5;
         if ((T_3_1.num >= 0 && pos3.num < 0 && (-5) < 0) || 
             (T_3_1.num <= 0 && pos3.num > 0 && (-5) > 0)) {
            err = ERR_overflow;
            goto ex_2;}
        err = stringOPsubstr(l2, CLU_5, T_3_1, &T_3_2);
        if (err != ERR_ok) goto ex_2;
        {
        if ((sigOPknown.array->int_low + sigOPknown.array->ext_size + 1) < sigOPknown.array->int_size) {
            sigOPknown.array->store->data[sigOPknown.array->int_low + sigOPknown.array->ext_size] = T_3_2.num;
            sigOPknown.array->ext_size++; sigOPknown.array->ext_high++;}
        else {
            err = arrayOPaddh(sigOPknown, T_3_2);
            if (err != ERR_ok) goto ex_2;}
        }
        }
        }
        end_while_1:;
        goto end_2;
        ex_2:
            if ((err == ERR_end_of_file)) {

  LINE(171);
                {
                {signal (ERR_ok);}}
            }
            else {
                goto ex_0;
            }
        end_2:;
    goto end_0;
    ex_0:
        {
            if (err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE init_known ****/

typedef struct{
    int count;
    OWNPTR type_owns;
    OWNPTR op_owns;
    struct OP_ENTRY entry[3];
} sig_OPS;

CLU_proc sig_oe_index = {{0,0,0,0}, sigOPindex, 0};
CLU_proc sig_oe_lookup = {{0,0,0,0}, sigOPlookup, 0};
CLU_proc sig_oe_name = {{0,0,0,0}, sigOPname, 0};

sig_OPS sig_ops_actual = {3, (OWNPTR)&sig_own_init, (OWNPTR)&sig_own_init, {
    {&sig_oe_index, "index"},
    {&sig_oe_lookup, "lookup"},
    {&sig_oe_name, "name"}}};

struct OPS *sig_ops = (struct OPS *)&sig_ops_actual;

/**** END CLUSTER sig ****/

/**** BEGIN CLUSTER int_const ****/

extern errcode intOPle();
static int int_const_own_init = 0;
OWN_req int_const_ownreqs = {0,0};
CLUREF int_constOPlow;
CLUREF int_constOPhigh;
errcode int_const_own_init_proc()
{
    errcode err;
    enter_own_init_proc();
        if (int_const_own_init == 0) {
        int_const_own_init = 1;
        {
            {int_constOPlow.num = 0;
            }
            }
        {
            {int_constOPhigh.num = 50;
            }
            }
        {signal(ERR_ok);}
    ex_0: pclu_unhandled(err); {signal(ERR_failure);}
        }
    }


/**** BEGIN PROCEDURE exists ****/

errcode int_constOPexists(i, ret_1)
CLUREF i;
CLUREF *ret_1;
    {
    errcode err;
    errcode ecode2;
        if (int_const_own_init == 0) {
            err = int_const_own_init_proc();
            if (err != ERR_ok) goto ex_0;
            }
    enter_proc(186);

  LINE(188);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    T_1_2.num = (int_constOPlow.num <= i.num)? true : false;
    T_1_1.num = T_1_2.num;
    if (T_1_2.num) {
        T_1_3.num = (i.num <= int_constOPhigh.num)? true : false;
        T_1_1.num = T_1_3.num;
    }
    if (T_1_1.num == true) {
        {
        {
        ret_1->tf = true;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(189);
    {
    {
    ret_1->tf = false;
    }
    {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 exists ****/

typedef struct{
    int count;
    OWNPTR type_owns;
    OWNPTR op_owns;
    struct OP_ENTRY entry[1];
} int_const_OPS;

CLU_proc int_const_oe_exists = {{0,0,0,0}, int_constOPexists, 0};

int_const_OPS int_const_ops_actual = {1, (OWNPTR)&int_const_own_init, (OWNPTR)&int_const_own_init, {
    {&int_const_oe_exists, "exists"}}};

struct OPS *int_const_ops = (struct OPS *)&int_const_ops_actual;

/**** END CLUSTER int_const ****/
