urbit/gen164/6/ut_mint.c

1065 lines
28 KiB
C
Raw Normal View History

2013-09-29 00:21:18 +04:00
/* j/6/mint.c
**
** This file is in the public domain.
*/
#include "all.h"
#include "../pit.h"
2014-06-11 18:06:36 +04:00
int FOO;
2013-09-29 00:21:18 +04:00
/* logic
*/
static u2_noun
2014-08-21 01:18:34 +04:00
_mint_in(u2_noun, u2_noun, u2_noun, u2_noun);
2013-09-29 00:21:18 +04:00
static u2_noun
2014-08-21 01:18:34 +04:00
_mint_bean(void)
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
return u2nt(c3__fork,
u2nq(c3__cube, 0, c3__atom, 'f'),
u2nq(c3__cube, 1, c3__atom, 'f'));
2013-09-29 00:21:18 +04:00
}
static u2_bean
2014-08-21 01:18:34 +04:00
_mint_vet(
2013-09-29 00:21:18 +04:00
u2_noun van)
{
2014-08-21 01:18:34 +04:00
// u2_bean vet = u2_cj_hook(van, "vet");
u2_bean vet = u2_cr_at(j2_ut_van_vet, van);
2013-09-29 00:21:18 +04:00
switch ( vet ) {
case u2_no:
2013-09-29 00:21:18 +04:00
case u2_yes: return vet;
2014-08-21 01:18:34 +04:00
default: return u2_cm_bail(c3__fail);
2013-09-29 00:21:18 +04:00
}
}
static u2_noun // produce
2014-08-21 01:18:34 +04:00
_mint_core(
2013-09-29 00:21:18 +04:00
u2_noun pac, // submit
u2_noun con) // submit
{
if ( (c3__void == pac) ) {
return c3__void;
} else {
2014-08-21 01:18:34 +04:00
return u2nt(c3__core, pac, con);
2013-09-29 00:21:18 +04:00
}
}
static u2_noun // produce
2014-08-21 01:18:34 +04:00
_mint_foil(
2013-09-29 00:21:18 +04:00
u2_noun pok) // submit
{
2014-08-21 01:18:34 +04:00
u2_noun p_pok = u2h(pok);
u2_noun q_pok = u2t(pok);
2013-09-29 00:21:18 +04:00
u2_noun ret;
2014-08-21 01:18:34 +04:00
if ( u2_yes == u2h(q_pok) ) {
u2_noun pq_pok = u2t(q_pok);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
ret = u2nc(
u2k(p_pok),
u2nc(u2_nul,
u2nc(
u2nc(
u2k(pq_pok),
u2nt(c3__elm, u2_nul, 1)),
2013-09-29 00:21:18 +04:00
u2_nul)));
}
else {
2014-08-21 01:18:34 +04:00
u2_noun pq_pok = u2h(u2t(q_pok));
u2_noun qq_pok = u2t(u2t(q_pok));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
ret = u2nc(u2k(p_pok),
u2nc(u2k(pq_pok),
u2k(qq_pok)));
2013-09-29 00:21:18 +04:00
}
2014-08-21 01:18:34 +04:00
u2z(pok);
2013-09-29 00:21:18 +04:00
return ret;
}
2013-09-29 00:21:18 +04:00
static u2_noun // produce
2014-08-21 01:18:34 +04:00
_mint_cond(
2013-09-29 00:21:18 +04:00
u2_noun pex, // submit
u2_noun yom, // submit
u2_noun woq) // submit
{
2014-08-21 01:18:34 +04:00
if ( 1 == u2h(pex) ) {
if ( 0 == u2t(pex) ) {
u2z(pex);
u2z(woq);
2013-09-29 00:21:18 +04:00
return yom;
}
2014-08-21 01:18:34 +04:00
else if ( 1 == u2t(pex) ) {
u2z(pex);
u2z(yom);
2013-09-29 00:21:18 +04:00
return woq;
}
}
2014-08-21 01:18:34 +04:00
return u2nq(6, pex, yom, woq);
2013-09-29 00:21:18 +04:00
}
static u2_noun
2014-08-21 01:18:34 +04:00
_mint_corn(
2013-09-29 00:21:18 +04:00
u2_noun van,
u2_noun sut,
u2_noun gen)
{
2014-08-21 01:18:34 +04:00
u2_noun mil = _mint_in(van, sut, c3__noun, gen);
u2_noun fol = u2k(u2t(mil));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(mil);
2013-09-29 00:21:18 +04:00
return fol;
}
static u2_noun // produce
2014-08-21 01:18:34 +04:00
_mint_nice(
2013-09-29 00:21:18 +04:00
u2_noun van, // retain
u2_noun gol, // retain
u2_noun typ) // submit
{
2014-08-21 01:18:34 +04:00
if ( (u2_yes == _mint_vet(van)) &&
(u2_no == j2_mcy(Pt6, ut, nest)(van, gol, u2_yes, typ)) )
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
// u2_noun dun = j2_mcy(Pt6, ut, dunq)(van, "need", gol);
// u2_noun niz = j2_mcy(Pt6, ut, dunq)(van, "have", typ);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
// u2_ct_push(u2nc(c3__mean, dun));
// u2_ct_push(u2nc(c3__mean, niz));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
return u2_cm_error("mint-nice");
2013-09-29 00:21:18 +04:00
}
else return typ;
}
static u2_noun // produce
2014-08-21 01:18:34 +04:00
_mint_coke(
2013-09-29 00:21:18 +04:00
u2_noun nug) // submit
{
u2_atom axe;
2014-08-21 01:18:34 +04:00
if ( 0 == u2h(nug) ) {
axe = u2t(nug);
} else if ( 10 == u2h(nug) ) {
u2_noun xin = u2k(u2t(u2t(nug)));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
axe = _mint_coke(xin);
2013-09-29 00:21:18 +04:00
}
else {
2014-08-21 01:18:34 +04:00
return u2_cm_error("mint-coke");
2013-09-29 00:21:18 +04:00
}
2014-08-21 01:18:34 +04:00
u2z(nug);
2013-09-29 00:21:18 +04:00
return axe;
}
static u2_noun // produce
2014-08-21 01:18:34 +04:00
_mint_edit(
2013-09-29 00:21:18 +04:00
u2_noun van, // retain
u2_noun sut, // retain
u2_noun mew, // retain
u2_noun p_lar, // retain
u2_noun rag, // submit
u2_noun hej) // submit
{
while ( 1 ) {
2014-08-21 01:18:34 +04:00
if ( u2_no == u2du(mew) ) {
u2_noun gim = j2_mcy(Pt6, ut, fire)(van, sut, rag);
u2_noun fol = j2_mby(Pt6, hike)(p_lar, hej);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(rag);
u2z(hej);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
return u2nc(gim, fol);
2013-09-29 00:21:18 +04:00
} else {
2014-08-21 01:18:34 +04:00
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 = j2_mcy(Pt6, ut, mint)(van, sut, c3__noun, qi_mew);
u2_noun p_zil = u2h(zil);
u2_noun q_zil = u2t(zil);
2013-09-29 00:21:18 +04:00
u2_noun wip = j2_mcy(Pt6, ut, tock)
2014-08-21 01:18:34 +04:00
(van, sut, pi_mew, p_zil, rag);
2014-08-21 01:18:34 +04:00
u2z(rag);
rag = u2k(u2t(wip));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
hej = u2nc(u2nc(u2k(u2h(wip)),
u2k(q_zil)),
2013-09-29 00:21:18 +04:00
hej);
2014-08-21 01:18:34 +04:00
u2z(zil);
u2z(wip);
2013-09-29 00:21:18 +04:00
mew = t_mew;
}
}
}
static u2_noun
2014-08-21 01:18:34 +04:00
_mint_brew(
2013-09-29 00:21:18 +04:00
u2_noun van,
u2_noun sut,
u2_bean tov,
u2_noun gen)
{
u2_noun von;
2013-09-29 00:21:18 +04:00
switch ( tov ) {
2014-08-21 01:18:34 +04:00
default: return u2_cm_bail(c3__fail);
case u2_yes:
2014-08-21 01:18:34 +04:00
von = u2k(van); break;
case u2_no:
2014-08-21 01:18:34 +04:00
von = u2_ci_molt(u2k(van), j2_ut_van_vet, u2_no, 0); break;
2013-09-29 00:21:18 +04:00
}
{
2014-08-21 01:18:34 +04:00
u2_noun mil = j2_mcy(Pt6, ut, mint)(von, sut, c3__noun, gen);
u2_noun fol = u2k(u2t(mil));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(mil);
u2z(von);
2013-09-29 00:21:18 +04:00
return fol;
}
}
static u2_noun // produce
2014-08-21 01:18:34 +04:00
_mint_bake(
2013-09-29 00:21:18 +04:00
u2_noun van, // retain
u2_noun sut, // retain
u2_noun dab) // retain
{
if ( (u2_nul == dab) ) {
2014-08-21 01:18:34 +04:00
return 0;
2013-09-29 00:21:18 +04:00
}
else {
u2_noun n_dab, l_dab, r_dab;
2014-08-21 01:18:34 +04:00
u2_cr_trel(dab, &n_dab, &l_dab, &r_dab);
if ( u2_no == u2du(n_dab) ) {
return u2_cm_bail(c3__fail);
}
2013-09-29 00:21:18 +04:00
else {
2014-08-21 01:18:34 +04:00
u2_noun qn_dab = u2t(n_dab);
2013-09-29 00:21:18 +04:00
u2_noun vad;
2014-08-21 01:18:34 +04:00
switch ( u2h(qn_dab) ) {
default: return u2_cm_bail(c3__exit);
2013-09-29 00:21:18 +04:00
case c3__ash: {
2014-08-21 01:18:34 +04:00
vad = _mint_brew(van, sut, u2_yes, u2t(qn_dab));
2013-09-29 00:21:18 +04:00
break;
}
case c3__elm: {
2014-08-21 01:18:34 +04:00
vad = _mint_brew(van, sut, u2_no, u2t(qn_dab));
2013-09-29 00:21:18 +04:00
break;
}
}
if ( (u2_nul == l_dab) && (u2_nul == r_dab) ) {
return vad;
}
else if ( (u2_nul == l_dab) ) {
2014-08-21 01:18:34 +04:00
return u2nc
(vad, _mint_bake(van, sut, r_dab));
2013-09-29 00:21:18 +04:00
}
else if ( (u2_nul == r_dab) ) {
2014-08-21 01:18:34 +04:00
return u2nc
(vad, _mint_bake(van, sut, l_dab));
2013-09-29 00:21:18 +04:00
}
else {
2014-08-21 01:18:34 +04:00
return u2nt
(vad,
_mint_bake(van, sut, l_dab),
_mint_bake(van, sut, r_dab));
2013-09-29 00:21:18 +04:00
}
}
}
}
static u2_noun
2014-08-21 01:18:34 +04:00
_mint_grow(
2013-09-29 00:21:18 +04:00
u2_noun van,
u2_noun sut,
u2_noun gol,
u2_atom mel,
u2_noun ruf,
u2_noun dab)
{
2014-08-21 01:18:34 +04:00
u2_noun dan = _mint_in(van, sut, c3__noun, ruf);
u2_noun p_dan = u2h(dan);
u2_noun q_dan = u2t(dan);
2013-09-29 00:21:18 +04:00
u2_noun toc = _mint_core
2014-08-21 01:18:34 +04:00
(u2k(p_dan),
u2nt(c3__gold,
u2k(p_dan),
u2nc(u2_nul, u2k(dab))));
u2_noun dez = _mint_bake(van, toc, dab);
u2_noun zod = u2nc(1, dez);
2013-09-29 00:21:18 +04:00
u2_noun cot = _mint_core
2014-08-21 01:18:34 +04:00
(u2k(p_dan),
u2nt(mel,
u2k(p_dan),
u2nc(u2k(dez),
u2k(dab))));
u2_noun ret = u2nc
(
_mint_nice(van, gol, cot),
j2_mby(Pt6, cons)(zod, q_dan));
u2z(zod);
u2z(toc);
u2z(dan);
2013-09-29 00:21:18 +04:00
return ret;
}
static u2_noun // produce
2014-08-21 01:18:34 +04:00
_mint_loc(
2013-09-29 00:21:18 +04:00
u2_noun van, // retain
u2_noun loc) // retain
{
2014-08-21 01:18:34 +04:00
u2_noun mol = u2nc('o', u2k(loc));
u2_noun sho = u2_cj_hook(van, "show");
u2_noun ret = u2_ci_molt(u2k(sho), u2_cv_sam, u2k(mol), 0);
2014-08-21 01:18:34 +04:00
u2z(mol);
u2z(sho);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
# define _mint_used()
2013-09-29 00:21:18 +04:00
static u2_noun // produce
2014-08-21 01:18:34 +04:00
_mint_in(
2013-09-29 00:21:18 +04:00
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gol, // retain
u2_noun gen) // retain
{
u2_noun p_gen, q_gen, r_gen;
u2_noun ret;
if ( (c3__void == sut) &&
2014-08-21 01:18:34 +04:00
!((u2_yes == u2du(gen)) && (c3__zpcb == u2h(gen))) )
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
if ( (u2_no == _mint_vet(van))
|| ((u2_yes == u2du(gen)) &&
((c3__zpfs == u2h(gen)) || (c3__zpzp == u2h(gen)))) )
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
return u2nt(c3__void, 0, 0);
2013-09-29 00:21:18 +04:00
}
else {
2014-08-21 01:18:34 +04:00
return u2_cm_error("mint-vain");
2013-09-29 00:21:18 +04:00
}
}
2014-08-21 01:18:34 +04:00
if ( u2_no == u2du(gen) ) {
u2_noun ter = u2_cr_at(u2_cv_con_3, van);
u2_noun rex = j2_mcy(Pt6, ap, open)(ter, gen);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
ret = _mint_in(van, sut, gol, rex);
u2z(rex);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
else if ( u2_yes == u2du(u2h(gen)) ) {
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun hed = _mint_in(van, sut, c3__noun, u2h(gen));
u2_noun tal = _mint_in(van, sut, c3__noun, u2t(gen));
u2_noun typ = j2_mby(Pt6, cell)(u2h(hed), u2h(tal));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
ret = u2nc
(
_mint_nice(van, gol, typ),
j2_mby(Pt6, cons)(u2t(hed), u2t(tal)));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(hed);
u2z(tal);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
} else switch ( u2h(gen) ) {
2013-09-29 00:21:18 +04:00
default: {
2014-08-21 01:18:34 +04:00
u2_noun ter = u2_cr_at(u2_cv_con_3, van);
u2_noun rex = j2_mcy(Pt6, ap, open)(ter, gen);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
if ( u2_yes == u2_cr_sing(rex, gen) ) {
2013-09-29 00:21:18 +04:00
#if 1
u2_noun zix = j2_mcy(Pt6, ut, shep)
2014-08-21 01:18:34 +04:00
(van, "gene", 'q', u2k(gen));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2_ct_push(u2nc(c3__mean, zix));
return u2_cm_error("mint-open");
2013-09-29 00:21:18 +04:00
#else
2014-08-21 01:18:34 +04:00
u2_err("h", u2h(gen));
return u2_cm_bail(c3__fail);
2013-09-29 00:21:18 +04:00
#endif
}
2014-08-21 01:18:34 +04:00
ret = _mint_in(van, sut, gol, rex);
u2z(rex);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__bcpt: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2014-01-04 11:28:16 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun sep = j2_mcy(Pt6, ut, seep)(van, sut, c3__read, p_gen);
2014-01-04 11:28:16 +04:00
u2_noun axe = u2h(sep);
2014-08-21 01:18:34 +04:00
u2_noun rex = j2_mcy(Pt6, al, whip)(van, q_gen, axe);
u2_noun ret = _mint_in(van, sut, gol, rex);
2014-01-04 11:28:16 +04:00
u2z(sep);
u2z(rex);
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__wtts: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-12-27 06:43:25 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun nob = j2_mcy(Pt6, al, bunt)(van, p_gen);
2014-01-05 07:27:22 +04:00
u2_noun dok = u2nc(c3__cnzz, q_gen);
2014-08-21 01:18:34 +04:00
u2_noun vol = _mint_corn(van, sut, dok);
u2_noun axe = _mint_coke(vol);
u2_noun wam = j2_mcy(Pt6, ut, play)(van, sut, nob);
2013-12-27 06:43:25 +04:00
2014-08-21 01:18:34 +04:00
ret = u2nc
(
_mint_nice(van, gol, _mint_bean()),
j2_mcy(Pt6, ut, fish)(van, wam, axe));
2013-12-27 06:43:25 +04:00
2014-08-21 01:18:34 +04:00
u2z(axe);
u2z(wam);
u2z(nob);
u2z(dok);
2014-01-01 10:48:21 +04:00
2013-12-27 06:43:25 +04:00
return ret;
}
2014-01-01 00:11:16 +04:00
2014-08-21 01:18:34 +04:00
case c3__wtcl: u2_cx_trel(u2t(gen), &p_gen, &q_gen, &r_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun bol = _mint_bean();
u2_noun nor = _mint_in(van, sut, bol, p_gen);
u2_noun fex = j2_mcy(Pt6, ut, gain)(van, sut, p_gen);
u2_noun wux = j2_mcy(Pt6, ut, lose)(van, sut, p_gen);
2013-09-29 00:21:18 +04:00
u2_noun duy = (c3__void == fex)
? ( (c3__void == wux)
2014-08-21 01:18:34 +04:00
? u2nc(0, 0)
: u2nc(1, 1) )
2013-09-29 00:21:18 +04:00
: ( (c3__void == wux)
2014-08-21 01:18:34 +04:00
? u2nc(1, 0)
: u2k(u2t(nor)) );
u2_noun hiq = _mint_in(van, fex, gol, q_gen);
u2_noun ran = _mint_in(van, wux, gol, r_gen);
ret = u2nc
(j2_mby(Pt6, fork)(u2h(hiq), u2h(ran)),
_mint_cond(duy,
u2k(u2t(hiq)),
u2k(u2t(ran))));
u2z(ran);
u2z(hiq);
u2z(nor);
u2z(wux);
u2z(fex);
u2z(bol);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__clhp: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun hed = _mint_in(van, sut, c3__noun, p_gen);
u2_noun tal = _mint_in(van, sut, c3__noun, q_gen);
u2_noun typ = j2_mby(Pt6, cell)(u2h(hed), u2h(tal));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
ret = u2nc
(
_mint_nice(van, gol, typ),
j2_mby(Pt6, cons)(u2t(hed), u2t(tal)));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(hed);
u2z(tal);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__dtts: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun typ = _mint_nice(van, gol, _mint_bean());
u2_noun one = _mint_corn(van, sut, p_gen);
u2_noun two = _mint_corn(van, sut, q_gen);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
return u2nc(typ, u2nt(5, one, two));
2013-09-29 00:21:18 +04:00
}
2014-08-21 01:18:34 +04:00
case c3__dtwt: p_gen = u2t(gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun typ = _mint_nice(van, gol, _mint_bean());
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
return u2nc
(
2013-09-29 00:21:18 +04:00
typ,
2014-08-21 01:18:34 +04:00
u2nc(3, _mint_corn(van, sut, p_gen)));
2013-09-29 00:21:18 +04:00
}
2014-08-21 01:18:34 +04:00
case c3__dtkt: p_gen = u2t(gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
u2_noun tom = c3__noun;
2014-08-21 01:18:34 +04:00
u2_noun sam = _mint_in(van, sut, tom, p_gen);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
ret = u2nc
(
_mint_nice(van, gol, tom),
u2nc(11, u2k(u2t(sam))));
2014-08-21 01:18:34 +04:00
u2z(sam);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__dtls: p_gen = u2t(gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun tom = u2nc(c3__atom, u2_blip);
u2_noun sam = _mint_in(van, sut, tom, p_gen);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
ret = u2nc
(
_mint_nice(van, gol, tom),
u2nc(4, u2k(u2t(sam))));
2014-08-21 01:18:34 +04:00
u2z(sam);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__dtzz: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun boc = (u2_no == u2ud(q_gen))
2013-09-29 00:21:18 +04:00
? c3__noun
2014-08-21 01:18:34 +04:00
: u2nc(c3__atom, u2k(p_gen));
u2_noun typ = j2_mby(Pt6, cube)(q_gen, boc);
u2_noun ret =
2014-08-21 01:18:34 +04:00
u2nc(
_mint_nice(van, gol, typ),
u2nc(1, u2k(q_gen)));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(boc);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__dttr: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun one = _mint_corn(van, sut, p_gen);
u2_noun two = _mint_corn(van, sut, q_gen);
2014-07-24 03:23:53 +04:00
2014-08-21 01:18:34 +04:00
return u2nc
(
_mint_nice(van, gol, c3__noun),
u2nt(2, one, two));
2013-09-29 00:21:18 +04:00
}
2014-08-21 01:18:34 +04:00
case c3__dtzy: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun typ = j2_mcy(Pt6, ut, play)(van, sut, gen);
u2_noun ret =
2014-08-21 01:18:34 +04:00
u2nc(
_mint_nice(van, gol, typ),
u2nc(1, u2k(q_gen)));
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__ktbr: p_gen = u2t(gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun ryd = _mint_in(van, sut, gol, p_gen);
u2_noun tyf = j2_mcy(Pt6, ut, wrap)(van, u2h(ryd), c3__iron);
u2_noun pro = u2nc(tyf, u2k(u2t(ryd)));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(ryd);
2013-09-29 00:21:18 +04:00
return pro;
}
2014-08-21 01:18:34 +04:00
case c3__ktpm: p_gen = u2t(gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun ryd = _mint_in(van, sut, gol, p_gen);
u2_noun tyf = j2_mcy(Pt6, ut, wrap)(van, u2h(ryd), c3__zinc);
u2_noun pro = u2nc(tyf, u2k(u2t(ryd)));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(ryd);
2013-09-29 00:21:18 +04:00
return pro;
}
2014-08-21 01:18:34 +04:00
case c3__ktwt: p_gen = u2t(gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun ryd = _mint_in(van, sut, gol, p_gen);
u2_noun tyf = j2_mcy(Pt6, ut, wrap)(van, u2h(ryd), c3__lead);
u2_noun pro = u2nc(tyf, u2k(u2t(ryd)));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(ryd);
2013-09-29 00:21:18 +04:00
return pro;
}
2014-08-21 01:18:34 +04:00
case c3__ktts: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun vat = _mint_in(van, sut, gol, q_gen);
2014-08-21 01:18:34 +04:00
ret = u2nc
(
j2_mcy(Pt6, ut, conk)(van, u2h(vat), p_gen),
u2k(u2t(vat)));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(vat);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__ktzp: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
{
2014-08-21 01:18:34 +04:00
u2_noun vat = _mint_in(van, sut, gol, q_gen);
2014-08-21 01:18:34 +04:00
ret = u2nc
(
j2_mcy(Pt6, ut, conk)(van, u2h(vat), p_gen),
u2k(u2t(vat)));
2014-08-21 01:18:34 +04:00
u2z(vat);
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__ktsg: p_gen = u2t(gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun nef = _mint_in(van, sut, gol, p_gen);
u2_noun p_nef = u2h(nef);
u2_noun q_nef = u2t(nef);
2013-09-29 00:21:18 +04:00
u2_noun fom;
{
2014-08-21 01:18:34 +04:00
u2_noun cag = j2_mcy(Pt6, ut, burn)(van, sut);
u2_noun wim = u2_cn_nock_an(cag, u2k(q_nef));
2013-09-29 00:21:18 +04:00
if ( 0 == u2h(wim) ) {
fom = u2nc(1, u2k(u2t(wim)));
} else {
fom = u2k(q_nef);
}
u2z(wim);
}
2014-08-21 01:18:34 +04:00
ret = u2nc(u2k(p_nef), fom);
2014-08-21 01:18:34 +04:00
u2z(nef);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__ktls: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun huz = j2_mcy(Pt6, ut, play)(van, sut, p_gen);
u2_noun hif = _mint_nice(van, gol, huz);
u2_noun zel = _mint_in(van, sut, hif, q_gen);
u2_noun ret = u2nc(hif, u2k(u2t(zel)));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(zel);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__kthx: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2014-06-11 18:06:36 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun huz = j2_mcy(Pt6, ut, play)(van, sut, p_gen);
u2_noun hif = _mint_nice(van, gol, huz);
u2_noun zel = _mint_in(van, sut, hif, q_gen);
u2_noun ret = u2nc(hif, u2k(u2t(zel)));
2014-06-11 18:06:36 +04:00
2014-06-26 01:59:22 +04:00
#if 0
2014-06-11 18:06:36 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun goz = j2_mcy(Pt6, ut, play)(van, sut, q_gen);
2014-06-11 18:06:36 +04:00
u2_noun bar;
FOO = 1;
fprintf(stderr, "\r\n");
2014-08-21 01:18:34 +04:00
bar = j2_mcy(Pt6, ut, nest)(van, huz, u2_no, goz);
2014-06-11 18:06:36 +04:00
fprintf(stderr, "kthx: bar %d\r\n", bar);
FOO = 0;
}
2014-06-26 01:59:22 +04:00
#endif
2014-08-21 01:18:34 +04:00
u2z(zel);
2014-06-11 18:06:36 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__tsgr: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun fid = _mint_in(van, sut, c3__noun, p_gen);
u2_noun p_fid = u2h(fid);
u2_noun q_fid = u2t(fid);
u2_noun dov = _mint_in(van, p_fid, gol, q_gen);
u2_noun p_dov = u2h(dov);
u2_noun q_dov = u2t(dov);
ret = u2nc
(u2k(p_dov),
j2_mbc(Pt6, comb)(q_fid, q_dov));
u2z(fid);
u2z(dov);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__tstr: u2_cx_trel(u2t(gen), &p_gen, &q_gen, &r_gen);
_mint_used();
2013-12-26 21:12:07 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun sep = j2_mcy(Pt6, ut, seep)(van, sut, c3__both, q_gen);
u2_noun bid = u2nt(u2k(p_gen), u2k(q_gen), sep);
u2_noun boc = j2_mby(Pt6, bull)(bid, sut);
u2_noun ret = _mint_in(van, boc, gol, r_gen);
2013-12-26 21:12:07 +04:00
u2z(bid);
u2z(boc);
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__cnts: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-12-15 12:23:23 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun sec = j2_mcy(Pt6, ut, seek)(van, sut, c3__read, p_gen);
u2_noun lar = _mint_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 mew = j2_mcy(Pt6, ut, snub)(van, sut, q_gen);
2013-12-15 12:23:23 +04:00
u2_noun yom = _mint_edit
2014-08-21 01:18:34 +04:00
(van, sut, mew, p_lar, u2k(qq_lar), u2_nul);
u2_noun p_yom = u2h(yom);
u2_noun q_yom = u2t(yom);
u2_noun ret = u2nc
(_mint_nice(van, gol, u2k(p_yom)),
(0 == pq_lar) ? u2k(q_yom)
: u2nt(9,
u2k(pq_lar),
u2k(q_yom)));
u2z(yom);
u2z(mew);
u2z(lar);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__pmcl: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun ruf = u2nt
(c3__clhp,
u2nc(u2_nul, 1),
u2k(p_gen));
u2_noun ret = _mint_grow(van, sut, gol, c3__zinc, ruf, q_gen);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(ruf);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__brcn: p_gen = u2t(gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun ruf = u2nc(u2_nul, 1);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
ret = _mint_grow(van, sut, gol, c3__gold, ruf, p_gen);
u2z(ruf);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__pmcn: p_gen = u2t(gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun ruf = u2nc(u2_nul, 1);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
ret = _mint_grow(van, sut, gol, c3__lead, ruf, p_gen);
u2z(ruf);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__pmls: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun ruf = u2nt
(c3__clhp,
u2nc(u2_nul, 1),
u2k(p_gen));
u2_noun ret = _mint_grow(van, sut, gol, c3__iron, ruf, q_gen);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(ruf);
2013-09-29 00:21:18 +04:00
return ret;
2013-12-05 02:30:09 +04:00
}
2014-08-21 01:18:34 +04:00
case c3__sgzp: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-12-05 02:30:09 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun typ = j2_mcy(Pt6, ut, play)(van, sut, p_gen);
u2_noun dug = j2_mcy(Pt6, ut, duck)(van, typ);
2013-12-05 02:30:09 +04:00
2014-08-21 01:18:34 +04:00
u2_ct_push(u2nc(c3__mean, dug));
2013-12-05 02:30:09 +04:00
{
2014-08-21 01:18:34 +04:00
ret = _mint_in(van, sut, gol, q_gen);
}
2014-08-21 01:18:34 +04:00
u2_ct_drop();
2013-12-05 02:30:09 +04:00
2014-08-21 01:18:34 +04:00
u2z(typ);
2013-12-05 02:30:09 +04:00
return ret;
2013-09-29 00:21:18 +04:00
}
2014-08-21 01:18:34 +04:00
case c3__sggr: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun hum = _mint_in(van, sut, gol, q_gen);
2013-09-29 00:21:18 +04:00
u2_noun bez;
2014-08-21 01:18:34 +04:00
if ( u2_yes == u2ud(p_gen) ) {
bez = u2k(p_gen);
2013-09-29 00:21:18 +04:00
} else {
2014-08-21 01:18:34 +04:00
bez = u2nc(u2k(u2h(p_gen)),
_mint_corn(van, sut, u2t(p_gen)));
2013-09-29 00:21:18 +04:00
}
2014-08-21 01:18:34 +04:00
ret = u2nc(
u2k(u2h(hum)),
u2nt(10, bez, u2k(u2t(hum))));
2014-08-21 01:18:34 +04:00
u2z(hum);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__zpts: p_gen = u2t(gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun von = u2_ci_molt(u2k(van), j2_ut_van_vet, u2_no, 0);
u2_noun sev = _mint_corn(von, sut, p_gen);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(von);
return u2nc(c3__noun, u2nc(1, sev));
2013-09-29 00:21:18 +04:00
}
2014-08-21 01:18:34 +04:00
case c3__zpcm: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
return u2nc
(
_mint_nice(van,
gol,
2014-08-21 01:18:34 +04:00
j2_mcy(Pt6, ut, play)(van, sut, p_gen)),
u2nc(1, u2k(q_gen)));
2013-09-29 00:21:18 +04:00
}
2014-08-21 01:18:34 +04:00
case c3__zpcb: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_ct_push(u2nc(c3__mean, _mint_loc(van, p_gen)));
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun hum = _mint_in(van, sut, gol, q_gen);
u2_noun bez = u2nt(c3__spot, 1, u2k(p_gen));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
ret = u2nc(
u2k(u2h(hum)),
u2nt(10, bez, u2k(u2t(hum))));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(hum);
2013-09-29 00:21:18 +04:00
}
2014-08-21 01:18:34 +04:00
u2_ct_drop();
2013-09-29 00:21:18 +04:00
return ret;
}
case c3__zpcn:
2014-08-21 01:18:34 +04:00
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun pet = u2_cj_hook(van, "seed");
u2_noun p_pet = u2h(pet);
u2_noun q_pet = u2t(pet);
2013-09-29 00:21:18 +04:00
u2_noun ret;
2014-08-21 01:18:34 +04:00
ret = u2nc(_mint_nice(van, gol, u2k(p_pet)),
u2nc(1, u2k(q_pet)));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(pet);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__zpsm: u2_cx_cell(u2t(gen), &p_gen, &q_gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
u2_noun vos = _mint_in(van, sut, c3__noun, q_gen);
u2_noun zur = j2_mcy(Pt6, ut, play)(van, sut, p_gen);
u2_noun p_vos = u2h(vos);
u2_noun q_vos = u2t(vos);
u2_noun waz = u2nc(1, u2k(p_vos));
u2_noun sif = j2_mcy(Pt6, ut, sift)(van, sut, zur);
u2_noun cig = j2_mby(Pt6, cell)(sif, p_vos);
2013-09-29 00:21:18 +04:00
u2_noun ret;
2014-08-21 01:18:34 +04:00
ret = u2nc(
_mint_nice(van, gol, cig),
j2_mby(Pt6, cons)(waz, q_vos));
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(waz);
u2z(zur);
u2z(sif);
u2z(vos);
2013-09-29 00:21:18 +04:00
return ret;
}
2014-08-21 01:18:34 +04:00
case c3__zpfs: p_gen = u2t(gen);
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
if ( u2_yes == _mint_vet(van) ) {
u2_noun zur = j2_mcy(Pt6, ut, play)(van, sut, p_gen);
u2_noun dun = j2_mcy(Pt6, ut, dunq)(van, "lost", zur);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2_ct_push(u2nc(c3__mean, dun));
return u2_cm_error("mint-lost");
2013-09-29 00:21:18 +04:00
}
else {
2014-08-21 01:18:34 +04:00
return u2nt(c3__void, 0, 0);
2013-09-29 00:21:18 +04:00
}
}
case c3__zpzp:
2014-08-21 01:18:34 +04:00
_mint_used();
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
return u2nt(c3__void, 0, 0);
2013-09-29 00:21:18 +04:00
}
}
}
u2_noun // produce
2014-08-21 01:18:34 +04:00
j2_mcx(Pt6, ut, mint)(
2013-09-29 00:21:18 +04:00
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gol,
u2_noun gen) // retain
{
2014-08-21 01:18:34 +04:00
return _mint_in(van, sut, gol, gen);
2013-09-29 00:21:18 +04:00
}
/* boilerplate
*/
u2_ho_jet
2013-09-29 00:21:18 +04:00
j2_mcj(Pt6, ut, mint)[];
u2_noun // produce
2014-08-21 01:18:34 +04:00
j2_mc(Pt6, ut, mint)(
2013-09-29 00:21:18 +04:00
u2_noun cor) // retain
{
u2_noun sut, gol, gen, van;
2014-08-21 01:18:34 +04:00
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &gol,
2013-09-29 00:21:18 +04:00
u2_cv_sam_3, &gen,
u2_cv_con, &van,
2013-09-29 00:21:18 +04:00
0)) ||
2014-08-21 01:18:34 +04:00
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
return u2_cm_bail(c3__fail);
2013-09-29 00:21:18 +04:00
} else {
2014-08-21 01:18:34 +04:00
return j2_mcx(Pt6, ut, mint)(van, sut, gol, gen);
2013-09-29 00:21:18 +04:00
}
}
u2_weak // produce
2014-08-21 01:18:34 +04:00
j2_mci(Pt6, ut, mint)(
2013-09-29 00:21:18 +04:00
u2_noun van, // retain
u2_noun sut, // retain
2013-09-29 00:21:18 +04:00
u2_noun gol, // retain
u2_noun gen) // retain
{
2014-08-21 01:18:34 +04:00
u2_weak hoc = u2_cj_look(van, "mint");
2013-09-29 00:21:18 +04:00
if ( u2_none == hoc ) {
c3_assert(!"register mint");
return u2_none;
} else {
2014-08-21 01:18:34 +04:00
u2_weak von = u2_ci_molt(u2k(van), u2_cv_sam, u2k(sut), 0);
u2_weak gat = u2_cn_nock_on(von, hoc);
u2_weak cor = u2_ci_molt(u2k(gat),
u2_cv_sam_2, u2k(gol),
u2_cv_sam_3, u2k(gen),
2013-09-29 00:21:18 +04:00
0);
if ( (u2_none == j2_mcj(Pt6, ut, mint)[0].xip) ) {
2014-08-21 01:18:34 +04:00
u2_noun xip = u2_cj_find(cor);
2013-09-29 00:21:18 +04:00
c3_assert(u2_none != xip);
j2_mcj(Pt6, ut, mint)[0].xip = xip;
}
2014-08-21 01:18:34 +04:00
u2z(gat);
2013-09-29 00:21:18 +04:00
return cor;
}
}
u2_noun // produce
2014-08-21 01:18:34 +04:00
j2_mcy(Pt6, ut, mint)(
2013-09-29 00:21:18 +04:00
u2_noun van, // retain
u2_noun sut, // retain
u2_noun gol, // retain
u2_noun gen) // retain
{
u2_ho_jet *jet_j = &j2_mcj(Pt6, ut, mint)[0];
if ( (jet_j->sat_s & u2_jet_live) && !(jet_j->sat_s & u2_jet_test) ) {
if ( !(jet_j->sat_s & u2_jet_memo) ) {
2014-08-21 01:18:34 +04:00
return j2_mcx(Pt6, ut, mint)(van, sut, gol, gen);
2013-09-29 00:21:18 +04:00
}
else {
c3_m fun_m = c3__mint;
2014-08-21 01:18:34 +04:00
u2_noun vrf = u2_cr_at(j2_ut_van_vrf, van);
u2_noun pro = u2_ch_find_4(fun_m, vrf, sut, gol, gen);
2013-09-29 00:21:18 +04:00
if ( u2_none != pro ) {
return pro;
}
else {
2014-08-21 01:18:34 +04:00
pro = j2_mcx(Pt6, ut, mint)(van, sut, gol, gen);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
return u2_ch_save_4(fun_m, vrf, sut, gol, gen, pro);
2013-09-29 00:21:18 +04:00
}
}
}
else {
u2_noun cor, fol, pro;
2014-08-21 01:18:34 +04:00
cor = j2_mci(Pt6, ut, mint)(van, sut, gol, gen);
fol = u2h(cor);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
pro = u2_ho_use(jet_j, cor, fol);
if ( u2_none == pro ) return u2_cm_bail(c3__fail);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
u2z(cor);
u2z(fol);
2013-09-29 00:21:18 +04:00
return pro;
}
}
/* structures
*/
u2_weak
2014-08-21 01:18:34 +04:00
j2_mck(Pt6, ut, mint)(
2013-09-29 00:21:18 +04:00
u2_noun cor)
{
u2_noun sut, gol, gen, van;
2014-08-21 01:18:34 +04:00
if ( (u2_no == u2_cr_mean(cor, u2_cv_sam_2, &gol,
2013-09-29 00:21:18 +04:00
u2_cv_sam_3, &gen,
u2_cv_con, &van,
2013-09-29 00:21:18 +04:00
0)) ||
2014-08-21 01:18:34 +04:00
(u2_none == (sut = u2_cr_at(u2_cv_sam, van))) )
2013-09-29 00:21:18 +04:00
{
2014-08-21 01:18:34 +04:00
return u2_cm_bail(c3__fail);
2013-09-29 00:21:18 +04:00
} else {
2014-08-21 01:18:34 +04:00
u2_noun vrf = u2_cr_at(j2_ut_van_vrf, van);
2013-09-29 00:21:18 +04:00
2014-08-21 01:18:34 +04:00
return u2nq(u2k(vrf),
u2k(sut),
u2k(gol),
u2k(gen));
2013-09-29 00:21:18 +04:00
}
}
/* structures
*/
u2_ho_jet
2013-09-29 00:21:18 +04:00
j2_mcj(Pt6, ut, mint)[] = {
{ ".2", c3__hevy,
j2_mc(Pt6, ut, mint),
2013-09-29 00:21:18 +04:00
Tier6_b_memo,
u2_none, u2_none,
j2_mck(Pt6, ut, mint), c3__mint,
},
{ }
};