urbit/j/6/ut_mull.c
2014-09-05 12:55:16 -07:00

871 lines
22 KiB
C

/* j/6/mull.c
**
** This file is in the public domain.
*/
#include "all.h"
/* functions
*/
static u2_noun
_mull_in(u2_noun, u2_noun, u2_noun, u2_noun, u2_noun);
static u2_bean
_mull_vet(
u2_noun van)
{
// u2_bean vet = u2_cj_hook(u2k(van), "vet");
u2_bean vet = u2_cr_at(u2_cqfu_van_vet, van);
switch ( vet ) {
case u2_no:
case u2_yes: return vet;
default: return u2_cm_bail(c3__fail);
}
}
static u2_noun
_mull_core(
u2_noun pac,
u2_noun con)
{
if ( (c3__void == pac) ) {
return c3__void;
} else {
return u2nt(c3__core, pac, con);
}
}
static u2_noun
_mull_bean()
{
return u2nt(c3__fork,
u2nq(c3__cube, 0, c3__atom, 'f'),
u2nq(c3__cube, 1, c3__atom, 'f'));
}
static u2_noun
_mull_loc(
u2_noun van,
u2_noun loc)
{
u2_noun mol = u2nc('o', u2k(loc));
u2_noun sho = u2_cj_hook(u2k(van), "show");
u2_noun ret = u2_ci_molt(u2k(sho), u2_cv_sam, u2k(mol), 0);
u2z(mol);
u2z(sho);
return ret;
}
static u2_noun
_mull_foil(
u2_noun pok)
{
u2_noun p_pok = u2h(pok);
u2_noun q_pok = u2t(pok);
u2_noun ret;
if ( u2_yes == u2h(q_pok) ) {
u2_noun pq_pok = u2t(q_pok);
ret = u2nc(
u2k(p_pok),
u2nc(u2_nul,
u2nc(
u2nc(
u2k(pq_pok),
u2nt(c3__elm, u2_nul, 1)),
u2_nul)));
}
else {
u2_noun pq_pok = u2h(u2t(q_pok));
u2_noun qq_pok = u2t(u2t(q_pok));
ret = u2nc(u2k(p_pok),
u2nc(u2k(pq_pok),
u2k(qq_pok)));
}
u2z(pok);
return ret;
}
static u2_noun
_mull_coke(
u2_noun nug)
{
u2_atom axe;
if ( 0 == u2h(nug) ) {
axe = u2t(nug);
} else if ( 10 == u2h(nug) ) {
u2_noun xin = u2k(u2t(u2t(nug)));
axe = _mull_coke(xin);
}
else {
return u2_cm_error("mint-coke");
}
u2z(nug);
return axe;
}
static u2_noun
_mull_doke(
u2_noun van,
u2_noun sut,
u2_noun gen)
{
u2_noun fug = u2_cqfu_mint(van, sut, c3__noun, gen);
u2_noun axe = _mull_coke(u2k(u2t(fug)));
u2z(fug);
return axe;
}
static u2_noun
_mull_nice(
u2_noun van,
u2_noun gol,
u2_noun typ)
{
if ( u2_no == u2_cqfu_nest(van, gol, u2_yes, typ) ) {
// u2_noun dun = u2_cqfu_dunq(van, "need", gol);
// u2_noun niz = u2_cqfu_dunq(van, "have", typ);
// u2_ct_push(u2nc(c3__mean, dun));
// u2_ct_push(u2nc(c3__mean, niz));
return u2_cm_error("mull-nice");
}
else return typ;
}
static void
_mull_bake(
u2_noun van,
u2_noun sut,
u2_noun dox,
u2_noun dab)
{
if ( u2_nul != dab ) {
u2_noun n_dab, l_dab, r_dab;
u2_cr_trel(dab, &n_dab, &l_dab, &r_dab);
if ( u2_no == u2du(n_dab) ) {
u2_cm_bail(c3__fail);
}
else {
u2_noun qn_dab = u2t(n_dab);
u2_noun vad;
switch ( u2h(qn_dab) ) {
default: u2_cm_bail(c3__exit);
case c3__ash: {
vad = _mull_in(van, sut, c3__noun, dox, u2t(qn_dab));
break;
}
case c3__elm: {
vad = u2_nul;
break;
}
}
u2z(vad);
if ( (u2_nul == l_dab) && (u2_nul == r_dab) ) {
return;
}
else if ( (u2_nul == l_dab) ) {
_mull_bake(van, sut, dox, r_dab);
}
else if ( (u2_nul == r_dab) ) {
_mull_bake(van, sut, dox, l_dab);
}
else {
_mull_bake(van, sut, dox, l_dab);
_mull_bake(van, sut, dox, r_dab);
}
}
}
}
static u2_noun
_mull_grow(
u2_noun van,
u2_noun sut,
u2_noun gol,
u2_noun dox,
u2_atom mel,
u2_noun ruf,
u2_noun dab)
{
u2_noun dan = _mull_in(van, sut, c3__noun, dox, ruf);
u2_noun p_dan = u2h(dan);
u2_noun q_dan = u2t(dan);
u2_noun p_toc = _mull_core
(u2k(p_dan),
u2nt(c3__gold,
u2k(p_dan),
u2nc(u2_nul, u2k(dab))));
u2_noun q_toc = _mull_core
(u2k(q_dan),
u2nt(c3__gold,
u2k(q_dan),
u2nc(u2_nul, u2k(dab))));
u2_noun p_ret = _mull_core
(u2k(p_dan),
u2nt(u2k(mel),
u2k(p_dan),
u2nc(u2nc(u2_nul, u2_nul),
u2k(dab))));
u2_noun q_ret = _mull_core
(u2k(q_dan),
u2nt(u2k(mel),
u2k(q_dan),
u2nc(u2nc(u2_nul, u2_nul),
u2k(dab))));
u2_noun ret = u2nc(_mull_nice(van, gol, p_ret), q_ret);
_mull_bake(van, p_toc, q_toc, dab);
u2z(q_toc);
u2z(p_toc);
u2z(dan);
return ret;
}
static u2_noun
_mull_both(
u2_noun van,
u2_noun gol,
u2_noun typ)
{
return u2nc(_mull_nice(van, gol, u2k(typ)),
typ);
}
static u2_noun
_mull_edit(
u2_noun van,
u2_noun sut,
u2_noun dox,
u2_noun mew,
u2_noun p_yom,
u2_noun q_yom)
{
while ( 1 ) {
if ( u2_no == u2du(mew) ) {
return u2nc(p_yom, q_yom);
} else {
u2_noun i_mew = u2h(mew);
u2_noun t_mew = u2t(mew);
u2_noun pi_mew = u2h(i_mew);
u2_noun qi_mew = u2t(i_mew);
u2_noun zil = _mull_in(van, sut, c3__noun, dox, qi_mew);
u2_noun p_zil = u2h(zil);
u2_noun q_zil = u2t(zil);
u2_noun cuf = u2_cqfu_tock
(van, sut, pi_mew, p_zil, p_yom);
u2_noun dof = u2_cqfu_tock
(van, sut, pi_mew, q_zil, q_yom);
if ( u2_cr_sing(u2h(cuf), u2h(dof)) ) {
u2_cm_error("mull-bonk-a");
}
u2z(p_yom);
p_yom = u2k(u2t(cuf));
u2z(q_yom);
q_yom = u2k(u2t(dof));
u2z(dof);
u2z(cuf);
u2z(zil);
mew = t_mew;
}
}
}
# define _mull_used()
static u2_noun
_mull_in(
u2_noun van,
u2_noun sut,
u2_noun gol,
u2_noun dox,
u2_noun gen)
{
u2_noun p_gen, q_gen, r_gen;
u2_noun ret;
if ( u2_no == u2du(gen) ) {
u2_noun ter = u2_cr_at(u2_cv_con_3, van);
u2_noun rex = u2_cqfp_open(ter, gen);
ret = _mull_in(van, sut, gol, dox, rex);
u2z(rex);
return ret;
}
else if ( u2_yes == u2du(u2h(gen)) ) {
_mull_used();
{
u2_noun hed = _mull_in(van, sut, c3__noun, dox, u2h(gen));
u2_noun tal = _mull_in(van, sut, c3__noun, dox, u2t(gen));
u2_noun dis = u2_cqf_cell(u2h(hed), u2h(tal));
u2_noun dat = u2_cqf_cell(u2t(hed), u2t(tal));
u2_noun ret = u2nc(_mull_nice(van, gol, dis), dat);
u2z(tal);
u2z(hed);
return ret;
}
}
else switch ( u2h(gen) ) {
default: {
u2_noun ter = u2_cr_at(u2_cv_con_3, van);
u2_noun rex = u2_cqfp_open(ter, gen);
if ( u2_yes == u2_cr_sing(rex, gen) ) {
#if 1
u2_noun zix = u2_cqfu_shep
(van, "gene", 'q', u2k(gen));
u2_ct_push(u2nc(c3__mean, zix));
return u2_cm_error("mull-open");
#else
u2_err("h", u2h(gen));
return u2_cm_bail(c3__fail);
#endif
}
ret = _mull_in(van, sut, gol, dox, rex);
u2z(rex);
return ret;
}
case c3__bcpt: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun sep = u2_cqfu_seep(van, sut, c3__read, p_gen);
u2_noun pox = u2_cqfu_seep(van, dox, c3__read, p_gen);
u2_noun axe = u2h(sep);
if ( axe != u2h(pox) ) {
return u2_cm_error("mull-bonk-wing");
}
else {
u2_noun rex = u2_cqfl_whip(van, q_gen, axe);
u2_noun ret = _mull_in(van, sut, gol, dox, rex);
u2z(sep);
u2z(pox);
u2z(rex);
return ret;
}
}
case c3__wtts: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun nob = u2_cqfl_bunt(van, p_gen);
u2_noun p_waz = u2_cqfu_play(van, sut, nob);
u2_noun q_waz = u2_cqfu_play(van, dox, nob);
u2_noun dok = u2nc(c3__cnzz, q_gen);
u2_noun p_syx = _mull_doke(van, sut, dok);
u2_noun q_syx = _mull_doke(van, dox, dok);
u2_noun p_pov = u2_cqfu_fish(van, p_waz, p_syx);
u2_noun q_pov = u2_cqfu_fish(van, q_waz, q_syx);
if ( (u2_no == u2_cr_sing(p_syx, q_syx)) ||
(u2_no == u2_cr_sing(p_pov, q_pov)) )
{
return u2_cm_error("mull-bonk-b");
}
u2z(p_waz); u2z(q_waz);
u2z(p_syx); u2z(q_syx);
u2z(p_pov); u2z(q_pov);
u2z(nob);
u2z(dok);
return _mull_both(van, gol, _mull_bean());
}
case c3__wtcl: u2_cx_trel(u2t(gen), &p_gen, &q_gen, &r_gen);
_mull_used();
{
u2_noun bol = _mull_bean();
u2_noun nor = _mull_in(van, sut, bol, dox, p_gen);
u2_noun p_fex = u2_cqfu_gain(van, sut, p_gen);
u2_noun q_fex = u2_cqfu_gain(van, dox, p_gen);
u2_noun p_wux = u2_cqfu_lose(van, sut, p_gen);
u2_noun q_wux = u2_cqfu_lose(van, dox, p_gen);
u2_noun hiq, ran;
u2_noun dis, dat;
u2_noun ret;
if ( c3__void == p_fex ) {
hiq = u2nc(
c3__void,
(c3__void == q_fex)
? c3__void
: u2_cqfu_play(van, q_fex, q_gen));
} else if ( c3__void == q_fex ) {
hiq = u2_cm_error("mull-bonk-c");
}
else hiq = _mull_in(van, p_fex, gol, q_fex, q_gen);
if ( c3__void == p_wux ) {
ran = u2nc(
c3__void,
(c3__void == q_wux)
? c3__void
: u2_cqfu_play(van, q_wux, r_gen));
} else if ( c3__void == q_wux ) {
ran = u2_cm_error("mull-bonk-d");
}
else ran = _mull_in(van, p_wux, gol, q_wux, r_gen);
dis = u2_cqf_fork(u2h(hiq), u2h(ran));
dat = u2_cqf_fork(u2t(hiq), u2t(ran));
ret = u2nc(_mull_nice(van, gol, dis), dat);
u2z(ran);
u2z(hiq);
u2z(q_wux);
u2z(p_wux);
u2z(q_fex);
u2z(p_fex);
u2z(nor);
u2z(bol);
return ret;
}
case c3__clhp: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen);
u2_noun tal = _mull_in(van, sut, c3__noun, dox, q_gen);
u2_noun dis = u2_cqf_cell(u2h(hed), u2h(tal));
u2_noun dat = u2_cqf_cell(u2t(hed), u2t(tal));
u2_noun ret = u2nc(_mull_nice(van, gol, dis), dat);
u2z(tal);
u2z(hed);
return ret;
}
case c3__dtts: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen);
u2_noun tal = _mull_in(van, sut, c3__noun, dox, q_gen);
u2z(hed);
u2z(tal);
return _mull_both(van, gol, _mull_bean());
}
case c3__dtwt: p_gen = u2t(gen);
_mull_used();
{
u2_noun vay = _mull_in(van, sut, c3__noun, dox, p_gen);
u2z(vay);
return _mull_both(van, gol, _mull_bean());
}
case c3__dtkt: p_gen = u2t(gen);
_mull_used();
{
u2_noun wuq = c3__noun;
u2_noun vay = _mull_in(van, sut, wuq, dox, p_gen);
u2z(vay);
return _mull_both(van, gol, wuq);
}
case c3__dtls: p_gen = u2t(gen);
_mull_used();
{
u2_noun wuq = u2nc(c3__atom, u2_blip);
u2_noun vay = _mull_in(van, sut, wuq, dox, p_gen);
u2z(vay);
return _mull_both(van, gol, wuq);
}
case c3__dtzz: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun tof = u2nt
(c3__cube,
u2k(q_gen),
(u2_yes == u2du(q_gen))
? c3__noun
: u2nc(c3__atom, u2k(p_gen)));
return _mull_both(van, gol, tof);
}
case c3__dttr: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun hed = _mull_in(van, sut, c3__noun, dox, p_gen);
u2_noun tal = _mull_in(van, sut, c3__noun, dox, q_gen);
u2z(hed);
u2z(tal);
return _mull_both(van, gol, c3__noun);
}
case c3__dtzy: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun typ = u2_cqfu_play(van, sut, gen);
return _mull_both(van, gol, typ);
}
case c3__ktbr: p_gen = u2t(gen);
_mull_used();
{
u2_noun vat = _mull_in(van, sut, gol, dox, p_gen);
u2_noun pro = u2nc
(u2_cqfu_wrap(van, u2h(vat), c3__iron),
u2_cqfu_wrap(van, u2t(vat), c3__iron));
u2z(vat);
return pro;
}
case c3__ktpm: p_gen = u2t(gen);
_mull_used();
{
u2_noun vat = _mull_in(van, sut, gol, dox, p_gen);
u2_noun pro = u2nc
(u2_cqfu_wrap(van, u2h(vat), c3__zinc),
u2_cqfu_wrap(van, u2t(vat), c3__zinc));
u2z(vat);
return pro;
}
case c3__ktwt: p_gen = u2t(gen);
_mull_used();
{
u2_noun vat = _mull_in(van, sut, gol, dox, p_gen);
u2_noun pro = u2nc
(u2_cqfu_wrap(van, u2h(vat), c3__lead),
u2_cqfu_wrap(van, u2t(vat), c3__lead));
u2z(vat);
return pro;
}
case c3__ktts: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun vat = _mull_in(van, sut, gol, dox, q_gen);
u2_noun ret =
u2nc(
u2_cqfu_conk(van, u2h(vat), p_gen),
u2_cqfu_conk(van, u2t(vat), p_gen));
u2z(vat);
return ret;
}
case c3__ktzp: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun vat = _mull_in(van, sut, gol, dox, q_gen);
u2_noun ret =
u2nc(
u2_cqfu_conk(van, u2h(vat), p_gen),
u2_cqfu_conk(van, u2t(vat), p_gen));
u2z(vat);
return ret;
}
case c3__ktsg: p_gen = u2t(gen);
_mull_used();
{
return _mull_in(van, sut, gol, dox, p_gen);
}
case c3__ktls: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun p_hif = _mull_nice
(van, gol, u2_cqfu_play(van, sut, p_gen));
u2_noun q_hif = u2_cqfu_play(van, dox, p_gen);
u2_noun zel = _mull_in(van, sut, p_hif, dox, q_gen);
u2_noun ret = u2nc(p_hif, q_hif);
u2z(zel);
return ret;
}
case c3__kthx: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun p_hif = _mull_nice
(van, gol, u2_cqfu_play(van, sut, p_gen));
u2_noun q_hif = u2_cqfu_play(van, dox, p_gen);
u2_noun zel = _mull_in(van, sut, p_hif, dox, q_gen);
u2_noun ret = u2nc(p_hif, q_hif);
u2z(zel);
return ret;
}
case c3__tsgr: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun lem = _mull_in(van, sut, c3__noun, dox, p_gen);
u2_noun p_lem = u2h(lem);
u2_noun q_lem = u2t(lem);
u2_noun ret = _mull_in(van, p_lem, gol, q_lem, q_gen);
u2z(lem);
return ret;
}
case c3__tstr: u2_cx_trel(u2t(gen), &p_gen, &q_gen, &r_gen);
_mull_used();
{
u2_noun sep = u2_cqfu_seep(van, sut, c3__both, q_gen);
u2_noun pox = u2_cqfu_seep(van, dox, c3__both, q_gen);
u2_noun bid = u2nt(u2k(p_gen), u2k(q_gen), sep);
u2_noun yub = u2nt(u2k(p_gen), u2k(q_gen), pox);
u2_noun boc = u2_cqf_bull(bid, sut);
u2_noun nuf = u2_cqf_bull(yub, dox);
u2_noun ret = _mull_in(van, boc, gol, nuf, r_gen);
u2z(bid);
u2z(yub);
u2z(boc);
u2z(nuf);
return ret;
}
case c3__cnts: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun sec = u2_cqfu_seek(van, sut, c3__read, p_gen);
u2_noun suc = u2_cqfu_seek(van, dox, c3__read, p_gen);
u2_noun lar = _mull_foil(sec);
u2_noun p_lar = u2h(lar);
u2_noun q_lar = u2t(lar);
u2_noun pq_lar = u2h(q_lar);
u2_noun qq_lar = u2t(q_lar);
u2_noun vug = _mull_foil(suc);
u2_noun p_vug = u2h(vug);
u2_noun q_vug = u2t(vug);
u2_noun pq_vug = u2h(q_vug);
u2_noun qq_vug = u2t(q_vug);
if ( u2_and(u2_cr_sing(p_lar, p_vug), u2_cr_sing(pq_lar, pq_vug)) ) {
u2_cm_error("mull-bonk-e");
}
{
u2_noun mew = u2_cqfu_snub(van, sut, q_gen);
u2_noun yom = _mull_edit
(van, sut, dox, mew, u2k(qq_lar),
u2k(qq_vug));
u2_noun von = u2_ci_molt(u2k(van), u2_cqfu_van_vet, u2_no, 0);
u2_noun p_ret = u2_cqfu_fire(van, sut, u2h(yom));
u2_noun q_ret = u2_cqfu_fire(von, sut, u2t(yom));
u2z(von);
u2z(yom);
u2z(mew);
u2z(vug);
u2z(lar);
return u2nc(_mull_nice(van, gol, p_ret), q_ret);
}
}
case c3__pmcl: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun ruf = u2nt
(c3__clhp,
u2nc(u2_nul, 1),
u2k(p_gen));
u2_noun ret = _mull_grow
(van, sut, gol, dox, c3__zinc, ruf, q_gen);
u2z(ruf);
return ret;
}
case c3__brcn: p_gen = u2t(gen);
_mull_used();
{
u2_noun ruf = u2nc(u2_nul, 1);
ret = _mull_grow(van, sut, gol, dox, c3__gold, ruf, p_gen);
u2z(ruf);
return ret;
}
case c3__pmcn: p_gen = u2t(gen);
_mull_used();
{
u2_noun ruf = u2nc(u2_nul, 1);
ret = _mull_grow(van, sut, gol, dox, c3__lead, ruf, p_gen);
u2z(ruf);
return ret;
}
case c3__pmls: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun ruf = u2nt
(c3__clhp,
u2nc(u2_nul, 1),
u2k(p_gen));
u2_noun ret = _mull_grow
(van, sut, gol, dox, c3__iron, ruf, q_gen);
u2z(ruf);
return ret;
}
case c3__sgzp: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun typ = u2_cqfu_play(van, sut, p_gen);
u2_noun dug = u2_cqfu_duck(van, typ);
u2_noun ret;
u2_ct_push(u2nc(c3__mean, dug));
{
ret = _mull_in(van, sut, gol, dox, q_gen);
}
u2_ct_drop();
u2z(typ);
return ret;
}
case c3__sggr: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
return _mull_in(van, sut, gol, dox, q_gen);
}
case c3__zpcm: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun p_ret = u2_cqfu_play(van, sut, p_gen);
u2_noun q_ret = u2_cqfu_play(van, sut, q_gen);
return u2nc
(_mull_nice(van, gol, p_ret),
q_ret);
}
case c3__zpcb: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
{
u2_noun ret;
u2_ct_push(u2nc(c3__mean, _mull_loc(van, p_gen)));
{
ret = _mull_in(van, sut, gol, dox, q_gen);
}
u2_ct_drop();
return ret;
}
case c3__zpts: p_gen = u2t(gen);
_mull_used();
{
return _mull_both(van, gol, c3__noun);
}
case c3__zpcn:
_mull_used();
{
u2_noun pet = u2_cj_hook(u2k(van), "seed");
u2_noun peq = u2k(u2h(pet));
u2z(pet);
return _mull_both(van, gol, peq);
}
case c3__zpsm: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mull_used();
{
u2_noun p_zur = u2_cqfu_play(van, sut, p_gen);
u2_noun q_zur = u2_cqfu_play (van, dox, p_gen);
u2_noun vos = _mull_in(van, sut, c3__noun, dox, q_gen);
u2_noun p_ret = u2_cqf_cell(p_zur, u2h(vos));
u2_noun q_ret = u2_cqf_cell(q_zur, u2t(vos));
u2z(vos);
u2z(q_zur);
u2z(p_zur);
return u2nc
(_mull_nice(van, gol, p_ret), q_ret);
}
case c3__zpfs:
case c3__zpzp:
_mull_used();
{
return u2nc(c3__void, c3__void);
}
}
}
u2_bean
_cqfu_mull(
u2_noun van,
u2_noun sut,
u2_noun gol,
u2_noun dox,
u2_noun gen)
{
if ( u2_no == _mull_vet(van) ) {
return u2_yes;
} else {
u2_noun mul = _mull_in(van, sut, gol, dox, gen);
u2z(mul);
return u2_yes;
}
}
/* boilerplate
*/
u2_noun
u2_cwfu_mull(u2_noun cor)
{
u2_noun sut, gol, dox, gen, van;
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &gol,
u2_cv_sam_6, &dox,
u2_cv_sam_7, &gen,
u2_cv_con, &van,
0)) ||
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
{
return u2_cm_bail(c3__fail);
} else {
return _cqfu_mull(van, sut, gol, dox, gen);
}
}
u2_noun
u2_cqfu_mull(u2_noun van,
u2_noun sut,
u2_noun gol,
u2_noun dox,
u2_noun gen)
{
c3_m fun_m = c3__mull;
u2_noun pro = u2_cz_find_4(fun_m, sut, gol, dox, gen);
if ( u2_none != pro ) {
return pro;
}
else {
pro = _cqfu_mull(van, sut, gol, dox, gen);
return u2_cz_save_4(fun_m, sut, gol, dox, gen, pro);
}
}