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

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


/**** BEGIN CLUSTER maybe ****/


typedef struct {
int count;
    char *equal_name;
    char *similar_name;
    char *copy_name;
    char *_gcd_name;
} maybe_of_t_REQS;

maybe_of_t_REQS maybe_of_t_reqs_actual = {4,
    "equal", "similar", "copy", "_gcd"};

struct REQS * maybe_of_t_reqs = (struct REQS *)&maybe_of_t_reqs_actual;

typedef struct {
    int count;
    OWNPTR type_owns;
    OWNPTR op_owns;
    struct OP_ENTRY equal;
    struct OP_ENTRY similar;
    struct OP_ENTRY copy;
    struct OP_ENTRY _gcd;
} maybe_of_t_OPS;
extern errcode intOPequal();
extern errcode _cvt();
extern errcode boolOPnot();
extern errcode equal();
extern errcode similar();
extern errcode copy();
extern errcode intOP_gcd();
extern errcode _gcd();
extern errcode intOPdebug_print();
extern OWN_req gcd_tab_ownreqs;
extern struct OPS *gcd_tab_ops;
CLUREF STR_Bad_040value_040for_040maybe_044make_056;

OWN_ptr maybe_own_init; /* dummy */
typedef struct {
    int maybe_own_init;
    int none_own_init;
    int make_own_init;
    int exists_own_init;
    int value_own_init;
    int equal_own_init;
    int similar_own_init;
    int copy_own_init;
    int _gcd_own_init;
    int debug_print_own_init;
    maybe_of_t_OPS *t_ops;
} maybe_OWN_DEFN;

OWN_req maybe_ownreqs = {sizeof(maybe_OWN_DEFN), 10};

errcode maybe_own_init_proc()
{
struct {
errcode err;
maybe_OWN_DEFN *type_own_ptr;} locals;
locals.type_own_ptr = (maybe_OWN_DEFN *) CUR_PROC_VAR.proc->type_owns;

enter_own_init_proc();
    if (locals.type_own_ptr->maybe_own_init == 0) {
    stringOPcons("Bad value for maybe$make.", CLU_1, CLU_25, &STR_Bad_040value_040for_040maybe_044make_056);
    }
    if (locals.type_own_ptr->maybe_own_init == 0) {
    locals.type_own_ptr->maybe_own_init = 1;
    {signal(ERR_ok);}
    ex_0: pclu_unhandled(locals.err); {signal(ERR_failure);}
}
}

extern struct dbg_info* dbg_info_maybeOPnone;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG maybeOPnone_TRACE
int maybeOPnone_TRACE;
extern struct OPS *int_ops;
static Vlist11 ptowns_maybe = {0, 11,{ {0, 2, "maybe_init", &int_ops}
, {0, 2, "maybeOPnone_init", &int_ops}
, {0, 2, "maybeOPnone_init", &int_ops}
, {0, 2, "maybeOPnone_init", &int_ops}
, {0, 2, "maybeOPnone_init", &int_ops}
, {0, 2, "maybeOPnone_init", &int_ops}
, {0, 2, "maybeOPnone_init", &int_ops}
, {0, 2, "maybeOPnone_init", &int_ops}
, {0, 2, "maybeOPnone_init", &int_ops}
, {0, 2, "maybeOPnone_init", &int_ops}
,{0, 2, "t_ops", &int_ops}
}};

/**** BEGIN PROCEDURE none ****/

errcode maybeOPnone(ret_1)
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        maybe_OWN_DEFN *type_own_ptr;
        } locals;
    locals.DBG_INFO = dbg_info_maybeOPnone;
    locals.type_own_ptr = (maybe_OWN_DEFN *) CUR_PROC_VAR.proc->type_owns;
        if (locals.type_own_ptr->none_own_init == 0) {
        locals.type_own_ptr->none_own_init = 1;
    }
    enter_proc(20);

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

/**** END PROCEDURE none ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist3 *locals;
    Vlist0 *owns;
    Vlist11 *ptowns;
    Vlist0 *popowns;
    Slist1 *type_formals;
    Slist0 *op_formals;
    } dbg_info_maybeOPnone_actual;
static Vlist1 vals_maybeOPnone = {0, 1, { {0, 2, "", &int_ops}}
};
static siglist0 sigs_maybeOPnone = {0, 0};
static Vlist3 locals_maybeOPnone = {0, 3,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "type_own_ptr", &int_ops}}
};
static Vlist0 popowns_maybeOPnone = {0, 0};
Slist1 tformals_maybeOPnone = {0, 1, "t"};
Slist0 opformals_maybeOPnone = {0, 0};
dbg_info_maybeOPnone_actual dbg_info_maybeOPnone_data = {0, 12, 
    "maybeOPnone", "/common/pub/dcurtis-temp/pclu/lib/clu/maybe.clu", 0, 2, (int)maybeOPnone, 0, 
    &vals_maybeOPnone, &sigs_maybeOPnone, &locals_maybeOPnone, &NO_VALS, &ptowns_maybe, &NO_VALS, &tformals_maybeOPnone, &NO_PARMS};
    struct dbg_info *dbg_info_maybeOPnone = (struct dbg_info*)&dbg_info_maybeOPnone_data;
extern struct dbg_info* dbg_info_maybeOPmake;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG maybeOPmake_TRACE
int maybeOPmake_TRACE;
extern OWN_req int_ownreqs;

/**** BEGIN PROCEDURE make ****/

errcode maybeOPmake(x, ret_1)
CLUREF x;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        maybe_OWN_DEFN *type_own_ptr;
        CLUREF x;
        } locals;
    locals.x.num = UNINIT;
    locals.DBG_INFO = dbg_info_maybeOPmake;
    locals.x = x;
    locals.type_own_ptr = (maybe_OWN_DEFN *) CUR_PROC_VAR.proc->type_owns;
        if (locals.type_own_ptr->make_own_init == 0) {
        stringOPcons("Bad value for maybe$make.", CLU_1, CLU_25, &STR_Bad_040value_040for_040maybe_044make_056);
        }
        if (locals.type_own_ptr->make_own_init == 0) {
        locals.type_own_ptr->make_own_init = 1;
    }
    enter_proc(26);

  LINE(29);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    T_1_1.num = locals.x.num;
    T_1_2.num = -2147483648;
    T_1_3.num = (T_1_1.num == T_1_2.num)? true : false;
    if (T_1_3.num == true) {

  LINE(30);
        {
        elist[0] = STR_Bad_040value_040for_040maybe_044make_056;
        {signal (ERR_failure);}}
        }
        }/* end if */

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

/**** END PROCEDURE make ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist4 *locals;
    Vlist0 *owns;
    Vlist11 *ptowns;
    Vlist0 *popowns;
    Slist1 *type_formals;
    Slist0 *op_formals;
    } dbg_info_maybeOPmake_actual;
static Vlist1 vals_maybeOPmake = {0, 1, { {0, 2, "", &int_ops}}
};
static siglist0 sigs_maybeOPmake = {0, 0};
static Vlist4 locals_maybeOPmake = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "type_own_ptr", &int_ops},  {0, 2, "x", zero_ops, "t_ops"}}
};
static Vlist0 popowns_maybeOPmake = {0, 0};
Slist1 tformals_maybeOPmake = {0, 1, "t"};
Slist0 opformals_maybeOPmake = {0, 0};
dbg_info_maybeOPmake_actual dbg_info_maybeOPmake_data = {0, 12, 
    "maybeOPmake", "/common/pub/dcurtis-temp/pclu/lib/clu/maybe.clu", 0, 2, (int)maybeOPmake, 1, 
    &vals_maybeOPmake, &sigs_maybeOPmake, &locals_maybeOPmake, &NO_VALS, &ptowns_maybe, &NO_VALS, &tformals_maybeOPmake, &NO_PARMS};
    struct dbg_info *dbg_info_maybeOPmake = (struct dbg_info*)&dbg_info_maybeOPmake_data;
extern struct dbg_info* dbg_info_maybeOPexists;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG maybeOPexists_TRACE
int maybeOPexists_TRACE;
extern OWN_req bool_ownreqs;
extern struct OPS *bool_ops;

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

errcode maybeOPexists(m, ret_1)
CLUREF m;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        maybe_OWN_DEFN *type_own_ptr;
        CLUREF m;
        } locals;
    locals.m.num = UNINIT;
    locals.DBG_INFO = dbg_info_maybeOPexists;
    locals.m = m;
    locals.type_own_ptr = (maybe_OWN_DEFN *) CUR_PROC_VAR.proc->type_owns;
        if (locals.type_own_ptr->exists_own_init == 0) {
        }
        if (locals.type_own_ptr->exists_own_init == 0) {
        locals.type_own_ptr->exists_own_init = 1;
    }
    enter_proc(35);

  LINE(37);
    {
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    T_1_1.num = -2147483648;
    T_1_2.num = (locals.m.num == T_1_1.num)? true : false;
    T_1_3.num = T_1_2.num ^ 1;
    ret_1->num = T_1_3.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE exists ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist4 *locals;
    Vlist0 *owns;
    Vlist11 *ptowns;
    Vlist0 *popowns;
    Slist1 *type_formals;
    Slist0 *op_formals;
    } dbg_info_maybeOPexists_actual;
static Vlist1 vals_maybeOPexists = {0, 1, { {0, 2, "", &bool_ops}}
};
static siglist0 sigs_maybeOPexists = {0, 0};
static Vlist4 locals_maybeOPexists = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "type_own_ptr", &int_ops},  {0, 2, "m", &int_ops}}
};
static Vlist0 popowns_maybeOPexists = {0, 0};
Slist1 tformals_maybeOPexists = {0, 1, "t"};
Slist0 opformals_maybeOPexists = {0, 0};
dbg_info_maybeOPexists_actual dbg_info_maybeOPexists_data = {0, 12, 
    "maybeOPexists", "/common/pub/dcurtis-temp/pclu/lib/clu/maybe.clu", 0, 2, (int)maybeOPexists, 1, 
    &vals_maybeOPexists, &sigs_maybeOPexists, &locals_maybeOPexists, &NO_VALS, &ptowns_maybe, &NO_VALS, &tformals_maybeOPexists, &NO_PARMS};
    struct dbg_info *dbg_info_maybeOPexists = (struct dbg_info*)&dbg_info_maybeOPexists_data;
extern struct dbg_info* dbg_info_maybeOPvalue;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG maybeOPvalue_TRACE
int maybeOPvalue_TRACE;

/**** BEGIN PROCEDURE value ****/

errcode maybeOPvalue(m, ret_1)
CLUREF m;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        maybe_OWN_DEFN *type_own_ptr;
        CLUREF m;
        } locals;
    locals.m.num = UNINIT;
    locals.DBG_INFO = dbg_info_maybeOPvalue;
    locals.m = m;
    locals.type_own_ptr = (maybe_OWN_DEFN *) CUR_PROC_VAR.proc->type_owns;
        if (locals.type_own_ptr->value_own_init == 0) {
        }
        if (locals.type_own_ptr->value_own_init == 0) {
        locals.type_own_ptr->value_own_init = 1;
    }
    enter_proc(40);

  LINE(43);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = -2147483648;
    T_1_2.num = (locals.m.num == T_1_1.num)? true : false;
    if (T_1_2.num == true) {

  LINE(44);
        {
        {signal (ERR_wrong_tag);}}
        }
        }/* end if */

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

/**** END PROCEDURE value ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist1 *sigs;
    Vlist4 *locals;
    Vlist0 *owns;
    Vlist11 *ptowns;
    Vlist0 *popowns;
    Slist1 *type_formals;
    Slist0 *op_formals;
    } dbg_info_maybeOPvalue_actual;
static Vlist1 vals_maybeOPvalue = {0, 1, { {0, 2, "", zero_ops, "t_ops"}}
};
static sig_desc0 sig_maybeOPvalue_1 = {0, 3, "wrong_tag", {0, 0
}};
static siglist1 sigs_maybeOPvalue = {0, 1, (sig_desc*)&sig_maybeOPvalue_1};
static Vlist4 locals_maybeOPvalue = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "type_own_ptr", &int_ops},  {0, 2, "m", &int_ops}}
};
static Vlist0 popowns_maybeOPvalue = {0, 0};
Slist1 tformals_maybeOPvalue = {0, 1, "t"};
Slist0 opformals_maybeOPvalue = {0, 0};
dbg_info_maybeOPvalue_actual dbg_info_maybeOPvalue_data = {0, 12, 
    "maybeOPvalue", "/common/pub/dcurtis-temp/pclu/lib/clu/maybe.clu", 0, 2, (int)maybeOPvalue, 1, 
    &vals_maybeOPvalue, &sigs_maybeOPvalue, &locals_maybeOPvalue, &NO_VALS, &ptowns_maybe, &NO_VALS, &tformals_maybeOPvalue, &NO_PARMS};
    struct dbg_info *dbg_info_maybeOPvalue = (struct dbg_info*)&dbg_info_maybeOPvalue_data;
extern struct dbg_info* dbg_info_maybeOPequal;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG maybeOPequal_TRACE
int maybeOPequal_TRACE;

/**** BEGIN PROCEDURE equal ****/

errcode maybeOPequal(m1, m2, ret_1)
CLUREF m1;
CLUREF m2;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        maybe_OWN_DEFN *type_own_ptr;
        CLUREF m1;
        CLUREF m2;
        } locals;
    locals.m1.num = UNINIT;
    locals.m2.num = UNINIT;
    locals.DBG_INFO = dbg_info_maybeOPequal;
    locals.m1 = m1;
    locals.m2 = m2;
    locals.type_own_ptr = (maybe_OWN_DEFN *) CUR_PROC_VAR.proc->type_owns;
        if (locals.type_own_ptr->equal_own_init == 0) {
        }
        if (locals.type_own_ptr->equal_own_init == 0) {
        locals.type_own_ptr->equal_own_init = 1;
    }
    enter_proc(49);

  LINE(54);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = -2147483648;
    T_1_2.num = (locals.m1.num == T_1_1.num)? true : false;
    if (T_1_2.num == true) {

  LINE(55);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = -2147483648;
        T_2_2.num = (locals.m2.num == T_2_1.num)? true : false;
        if (T_2_2.num == true) {
            {
            {
            ret_1->tf = true;
            }
            {signal (ERR_ok);}}
            }
        else {
            {
            {
            ret_1->tf = false;
            }
            {signal (ERR_ok);}}
            }}/* end if */
        }
        }/* end if */

  LINE(57);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = -2147483648;
    T_1_2.num = (locals.m2.num == T_1_1.num)? true : false;
    if (T_1_2.num == true) {
        {
        {
        ret_1->tf = false;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(58);
    {
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
    T_1_1.num = locals.m1.num;
    T_1_2.num = locals.m2.num;
    T_1_4.proc = locals.type_own_ptr->t_ops->equal.fcn;
    CUR_PROC_VAR = T_1_4;
    locals.err = T_1_4.proc->proc(T_1_1, T_1_2, &T_1_3);
    if (locals.err != ERR_ok) goto ex_0;
    ret_1->num = T_1_3.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE equal ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist5 *locals;
    Vlist0 *owns;
    Vlist11 *ptowns;
    Vlist0 *popowns;
    Slist1 *type_formals;
    Slist0 *op_formals;
    } dbg_info_maybeOPequal_actual;
static Vlist1 vals_maybeOPequal = {0, 1, { {0, 2, "", &bool_ops}}
};
static siglist0 sigs_maybeOPequal = {0, 0};
static Vlist5 locals_maybeOPequal = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "type_own_ptr", &int_ops},  {0, 2, "m1", &int_ops},  {0, 2, "m2", &int_ops}}
};
static Vlist0 popowns_maybeOPequal = {0, 0};
Slist1 tformals_maybeOPequal = {0, 1, "t"};
Slist0 opformals_maybeOPequal = {0, 0};
dbg_info_maybeOPequal_actual dbg_info_maybeOPequal_data = {0, 12, 
    "maybeOPequal", "/common/pub/dcurtis-temp/pclu/lib/clu/maybe.clu", 0, 2, (int)maybeOPequal, 2, 
    &vals_maybeOPequal, &sigs_maybeOPequal, &locals_maybeOPequal, &NO_VALS, &ptowns_maybe, &NO_VALS, &tformals_maybeOPequal, &NO_PARMS};
    struct dbg_info *dbg_info_maybeOPequal = (struct dbg_info*)&dbg_info_maybeOPequal_data;
extern struct dbg_info* dbg_info_maybeOPsimilar;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG maybeOPsimilar_TRACE
int maybeOPsimilar_TRACE;

/**** BEGIN PROCEDURE similar ****/

errcode maybeOPsimilar(m1, m2, ret_1)
CLUREF m1;
CLUREF m2;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        maybe_OWN_DEFN *type_own_ptr;
        CLUREF m1;
        CLUREF m2;
        } locals;
    locals.m1.num = UNINIT;
    locals.m2.num = UNINIT;
    locals.DBG_INFO = dbg_info_maybeOPsimilar;
    locals.m1 = m1;
    locals.m2 = m2;
    locals.type_own_ptr = (maybe_OWN_DEFN *) CUR_PROC_VAR.proc->type_owns;
        if (locals.type_own_ptr->similar_own_init == 0) {
        }
        if (locals.type_own_ptr->similar_own_init == 0) {
        locals.type_own_ptr->similar_own_init = 1;
    }
    enter_proc(61);

  LINE(66);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = -2147483648;
    T_1_2.num = (locals.m1.num == T_1_1.num)? true : false;
    if (T_1_2.num == true) {

  LINE(67);
        {
        CLUREF T_2_1;
        CLUREF T_2_2;
        T_2_1.num = -2147483648;
        T_2_2.num = (locals.m2.num == T_2_1.num)? true : false;
        if (T_2_2.num == true) {
            {
            {
            ret_1->tf = true;
            }
            {signal (ERR_ok);}}
            }
        else {
            {
            {
            ret_1->tf = false;
            }
            {signal (ERR_ok);}}
            }}/* end if */
        }
        }/* end if */

  LINE(69);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = -2147483648;
    T_1_2.num = (locals.m2.num == T_1_1.num)? true : false;
    if (T_1_2.num == true) {
        {
        {
        ret_1->tf = false;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(70);
    {
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
    T_1_1.num = locals.m1.num;
    T_1_2.num = locals.m2.num;
    T_1_4.proc = locals.type_own_ptr->t_ops->similar.fcn;
    CUR_PROC_VAR = T_1_4;
    locals.err = T_1_4.proc->proc(T_1_1, T_1_2, &T_1_3);
    if (locals.err != ERR_ok) goto ex_0;
    ret_1->num = T_1_3.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE similar ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist5 *locals;
    Vlist0 *owns;
    Vlist11 *ptowns;
    Vlist0 *popowns;
    Slist1 *type_formals;
    Slist0 *op_formals;
    } dbg_info_maybeOPsimilar_actual;
static Vlist1 vals_maybeOPsimilar = {0, 1, { {0, 2, "", &bool_ops}}
};
static siglist0 sigs_maybeOPsimilar = {0, 0};
static Vlist5 locals_maybeOPsimilar = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "type_own_ptr", &int_ops},  {0, 2, "m1", &int_ops},  {0, 2, "m2", &int_ops}}
};
static Vlist0 popowns_maybeOPsimilar = {0, 0};
Slist1 tformals_maybeOPsimilar = {0, 1, "t"};
Slist0 opformals_maybeOPsimilar = {0, 0};
dbg_info_maybeOPsimilar_actual dbg_info_maybeOPsimilar_data = {0, 12, 
    "maybeOPsimilar", "/common/pub/dcurtis-temp/pclu/lib/clu/maybe.clu", 0, 2, (int)maybeOPsimilar, 2, 
    &vals_maybeOPsimilar, &sigs_maybeOPsimilar, &locals_maybeOPsimilar, &NO_VALS, &ptowns_maybe, &NO_VALS, &tformals_maybeOPsimilar, &NO_PARMS};
    struct dbg_info *dbg_info_maybeOPsimilar = (struct dbg_info*)&dbg_info_maybeOPsimilar_data;
extern struct dbg_info* dbg_info_maybeOPcopy;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG maybeOPcopy_TRACE
int maybeOPcopy_TRACE;

/**** BEGIN PROCEDURE copy ****/

errcode maybeOPcopy(m, ret_1)
CLUREF m;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        maybe_OWN_DEFN *type_own_ptr;
        CLUREF m;
        } locals;
    locals.m.num = UNINIT;
    locals.DBG_INFO = dbg_info_maybeOPcopy;
    locals.m = m;
    locals.type_own_ptr = (maybe_OWN_DEFN *) CUR_PROC_VAR.proc->type_owns;
        if (locals.type_own_ptr->copy_own_init == 0) {
        }
        if (locals.type_own_ptr->copy_own_init == 0) {
        locals.type_own_ptr->copy_own_init = 1;
    }
    enter_proc(73);

  LINE(78);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = -2147483648;
    T_1_2.num = (locals.m.num == T_1_1.num)? true : false;
    if (T_1_2.num == true) {
        {
        {
        ret_1->num = locals.m.num;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(79);
    {
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    CLUREF T_1_4;
    T_1_1.num = locals.m.num;
    T_1_3.proc = locals.type_own_ptr->t_ops->copy.fcn;
    CUR_PROC_VAR = T_1_3;
    locals.err = T_1_3.proc->proc(T_1_1, &T_1_2);
    if (locals.err != ERR_ok) goto ex_0;
    T_1_4.num = T_1_2.num;
    ret_1->num = T_1_4.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE copy ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist4 *locals;
    Vlist0 *owns;
    Vlist11 *ptowns;
    Vlist0 *popowns;
    Slist1 *type_formals;
    Slist0 *op_formals;
    } dbg_info_maybeOPcopy_actual;
static Vlist1 vals_maybeOPcopy = {0, 1, { {0, 2, "", &int_ops}}
};
static siglist0 sigs_maybeOPcopy = {0, 0};
static Vlist4 locals_maybeOPcopy = {0, 4,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "type_own_ptr", &int_ops},  {0, 2, "m", &int_ops}}
};
static Vlist0 popowns_maybeOPcopy = {0, 0};
Slist1 tformals_maybeOPcopy = {0, 1, "t"};
Slist0 opformals_maybeOPcopy = {0, 0};
dbg_info_maybeOPcopy_actual dbg_info_maybeOPcopy_data = {0, 12, 
    "maybeOPcopy", "/common/pub/dcurtis-temp/pclu/lib/clu/maybe.clu", 0, 2, (int)maybeOPcopy, 1, 
    &vals_maybeOPcopy, &sigs_maybeOPcopy, &locals_maybeOPcopy, &NO_VALS, &ptowns_maybe, &NO_VALS, &tformals_maybeOPcopy, &NO_PARMS};
    struct dbg_info *dbg_info_maybeOPcopy = (struct dbg_info*)&dbg_info_maybeOPcopy_data;
extern struct dbg_info* dbg_info_maybeOP_gcd;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG maybeOP_gcd_TRACE
int maybeOP_gcd_TRACE;

/**** BEGIN PROCEDURE _gcd ****/

errcode maybeOP_gcd(m, tab, ret_1)
CLUREF m;
CLUREF tab;
CLUREF *ret_1;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        maybe_OWN_DEFN *type_own_ptr;
        CLUREF m;
        CLUREF tab;
        } locals;
    locals.m.num = UNINIT;
    locals.tab.num = UNINIT;
    locals.DBG_INFO = dbg_info_maybeOP_gcd;
    locals.m = m;
    locals.tab = tab;
    locals.type_own_ptr = (maybe_OWN_DEFN *) CUR_PROC_VAR.proc->type_owns;
        if (locals.type_own_ptr->_gcd_own_init == 0) {
        }
        if (locals.type_own_ptr->_gcd_own_init == 0) {
        locals.type_own_ptr->_gcd_own_init = 1;
    }
    enter_proc(82);

  LINE(85);
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    T_1_1.num = -2147483648;
    T_1_2.num = (locals.m.num == T_1_1.num)? true : false;
    if (T_1_2.num == true) {
        {
        {
        CLUREF T_2_1;
        locals.err = intOP_gcd(locals.m, locals.tab, &T_2_1);
        if (locals.err != ERR_ok) goto ex_0;
        ret_1->num = T_2_1.num;
        }
        {signal (ERR_ok);}}
        }
        }/* end if */

  LINE(86);
    {
    {
    CLUREF T_1_1;
    CLUREF T_1_2;
    CLUREF T_1_3;
    T_1_1.num = locals.m.num;
    T_1_3.proc = locals.type_own_ptr->t_ops->_gcd.fcn;
    CUR_PROC_VAR = T_1_3;
    locals.err = T_1_3.proc->proc(T_1_1, locals.tab, &T_1_2);
    if (locals.err != ERR_ok) goto ex_0;
    ret_1->num = T_1_2.num;
    }
    {signal (ERR_ok);}}
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: elist[0].str = no_return_values_STRING;
        {signal(ERR_failure);}
    }

/**** END PROCEDURE _gcd ****/

typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist1 *vals;
    siglist0 *sigs;
    Vlist5 *locals;
    Vlist0 *owns;
    Vlist11 *ptowns;
    Vlist0 *popowns;
    Slist1 *type_formals;
    Slist0 *op_formals;
    } dbg_info_maybeOP_gcd_actual;
static Vlist1 vals_maybeOP_gcd = {0, 1, { {0, 2, "", &int_ops}}
};
static siglist0 sigs_maybeOP_gcd = {0, 0};
static Vlist5 locals_maybeOP_gcd = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "type_own_ptr", &int_ops},  {0, 2, "m", &int_ops},  {0, 2, "tab", &gcd_tab_ops}}
};
static Vlist0 popowns_maybeOP_gcd = {0, 0};
Slist1 tformals_maybeOP_gcd = {0, 1, "t"};
Slist0 opformals_maybeOP_gcd = {0, 0};
dbg_info_maybeOP_gcd_actual dbg_info_maybeOP_gcd_data = {0, 12, 
    "maybeOP_gcd", "/common/pub/dcurtis-temp/pclu/lib/clu/maybe.clu", 0, 2, (int)maybeOP_gcd, 2, 
    &vals_maybeOP_gcd, &sigs_maybeOP_gcd, &locals_maybeOP_gcd, &NO_VALS, &ptowns_maybe, &NO_VALS, &tformals_maybeOP_gcd, &NO_PARMS};
    struct dbg_info *dbg_info_maybeOP_gcd = (struct dbg_info*)&dbg_info_maybeOP_gcd_data;
extern struct dbg_info* dbg_info_maybeOPdebug_print;
#undef MY_TRACE_FLAG
#define MY_TRACE_FLAG maybeOPdebug_print_TRACE
int maybeOPdebug_print_TRACE;

/**** BEGIN PROCEDURE debug_print ****/

errcode maybeOPdebug_print(_rep, ps)
CLUREF _rep;
CLUREF ps;
    {
    struct {
        struct dbg_info *DBG_INFO;
        int DBG_LINE;
        errcode err;
        errcode ecode2;
        maybe_OWN_DEFN *type_own_ptr;
        CLUREF _rep;
        CLUREF ps;
        } locals;
    locals._rep.num = UNINIT;
    locals.ps.num = UNINIT;
    locals.DBG_INFO = dbg_info_maybeOPdebug_print;
    locals._rep = _rep;
    locals.ps = ps;
    locals.type_own_ptr = (maybe_OWN_DEFN *) CUR_PROC_VAR.proc->type_owns;
        if (locals.type_own_ptr->debug_print_own_init == 0) {
        }
        if (locals.type_own_ptr->debug_print_own_init == 0) {
        locals.type_own_ptr->debug_print_own_init = 1;
    }
    enter_proc(1);

  LINE(2);
    {
    locals.err = intOPdebug_print(locals._rep, locals.ps);
    if (locals.err != ERR_ok) goto ex_0;
    }
    goto end_0;
    ex_0:
        {
            if (locals.err == ERR_failure) {signal(ERR_failure);}
            elist[0] = _pclu_erstr(locals.err);
            {signal(ERR_failure);}
        }
    end_0: {signal(ERR_ok);}
    }

/**** END PROCEDURE debug_print ****/

extern struct OPS *pstream_ops;
typedef struct {
    int hdr;
    int count;
    char *name;
    char *fname;
    bool is_iter;
    int is_parmd;
    int addr;
    int nargs;
    Vlist0 *vals;
    siglist0 *sigs;
    Vlist5 *locals;
    Vlist0 *owns;
    Vlist11 *ptowns;
    Vlist0 *popowns;
    Slist1 *type_formals;
    Slist0 *op_formals;
    } dbg_info_maybeOPdebug_print_actual;
static Vlist0 vals_maybeOPdebug_print = {0, 0};
static siglist0 sigs_maybeOPdebug_print = {0, 0};
static Vlist5 locals_maybeOPdebug_print = {0, 5,{ {0, 2, "err", &int_ops},  {0, 2, "ecode2", &int_ops},  {0, 2, "type_own_ptr", &int_ops},  {0, 2, "_rep", &int_ops},  {0, 2, "ps", &pstream_ops}}
};
static Vlist0 popowns_maybeOPdebug_print = {0, 0};
Slist1 tformals_maybeOPdebug_print = {0, 1, "t"};
Slist0 opformals_maybeOPdebug_print = {0, 0};
dbg_info_maybeOPdebug_print_actual dbg_info_maybeOPdebug_print_data = {0, 12, 
    "maybeOPdebug_print", "/common/pub/dcurtis-temp/pclu/lib/clu/maybe.clu", 0, 2, (int)maybeOPdebug_print, 2, 
    &vals_maybeOPdebug_print, &sigs_maybeOPdebug_print, &locals_maybeOPdebug_print, &NO_VALS, &ptowns_maybe, &NO_VALS, &tformals_maybeOPdebug_print, &NO_PARMS};
    struct dbg_info *dbg_info_maybeOPdebug_print = (struct dbg_info*)&dbg_info_maybeOPdebug_print_data;
typedef struct{
    int count;
    OWNPTR type_owns;
    OWNPTR op_owns;
    struct OP_ENTRY entry[9];
} maybe_OPS;

CLU_proc maybe_oe__gcd = {{0,0,0,0}, maybeOP_gcd, 0};
CLU_proc maybe_oe_copy = {{0,0,0,0}, maybeOPcopy, 0};
CLU_proc maybe_oe_equal = {{0,0,0,0}, maybeOPequal, 0};
CLU_proc maybe_oe_exists = {{0,0,0,0}, maybeOPexists, 0};
CLU_proc maybe_oe_make = {{0,0,0,0}, maybeOPmake, 0};
CLU_proc maybe_oe_none = {{0,0,0,0}, maybeOPnone, 0};
CLU_proc maybe_oe_similar = {{0,0,0,0}, maybeOPsimilar, 0};
CLU_proc maybe_oe_value = {{0,0,0,0}, maybeOPvalue, 0};
CLU_proc maybe_oe_debug_print = {{0,0,0,0}, maybeOPdebug_print, 0};

maybe_OPS maybe_ops_actual = {9, (OWNPTR)&maybe_own_init, (OWNPTR)&maybe_own_init, {
    {&maybe_oe__gcd, "_gcd"},
    {&maybe_oe_copy, "copy"},
    {&maybe_oe_equal, "equal"},
    {&maybe_oe_exists, "exists"},
    {&maybe_oe_make, "make"},
    {&maybe_oe_none, "none"},
    {&maybe_oe_similar, "similar"},
    {&maybe_oe_value, "value"},
    {&maybe_oe_debug_print, "debug_print"}}};

struct OPS *maybe_ops = (struct OPS *)&maybe_ops_actual;

/**** END CLUSTER maybe ****/
