示例#1
0
文件: foam.c 项目: mnemnion/urbit
/* functions
*/
  static u2_noun                                                  //  produce
  _foam_roll(u2_wire wir_r,
             u2_noun quz)                                         //  retain
  {
    if ( u2_no == u2_dust(quz) ) {
      return c3__void;
    } else {
      u2_noun voo = _foam_roll(wir_r, u2_t(quz));
      u2_noun oon = j2_mby(Pt6, fork)(wir_r, u2_h(u2_h(quz)), voo);

      u2_rz(wir_r, voo);
      return oon;
    }
  }
示例#2
0
文件: ut_swab.c 项目: mnemnion/urbit
  static u2_noun                                                  //  produce
  _snip(u2_wire wir_r,
        u2_noun van,                                              //  retain
        u2_noun sut,                                              //  retain
        u2_noun peh,                                              //  retain
        u2_noun gen)                                              //  retain
  {
    if ( u2_no == u2_dust(peh) ) {
      return u2_rx(wir_r, gen);
    } else {
      u2_noun i_peh = u2_h(peh);
      u2_noun t_peh = u2_t(peh);

      if ( u2_no == u2_dust(i_peh) ) {
        u2_noun fic = j2_mcy(Pt6, ut, fink)(wir_r, van, sut, c3__rite, i_peh);
        u2_noun fom = j2_mby(Pt6, foam)(wir_r, fic);
        u2_noun ret = _snip(wir_r, van, u2_t(fom), t_peh, gen);

        u2_rz(wir_r, fom);
        u2_rz(wir_r, fic);

        return ret;
      } else {
        u2_noun pi_peh = u2_t(i_peh);
        u2_noun vas = j2_mcy(Pt6, ut, peek)(wir_r, van, sut, c3__rite, pi_peh);
        u2_noun wan = (u2_no == u2_dust(t_peh))
                      ? j2_mcy(Pt6, ut, snap)(wir_r, van, vas, gen)
                      : u2_rx(wir_r, gen);
        u2_noun ret = _snip(wir_r, van, vas, t_peh, wan);

        u2_rz(wir_r, wan);
        u2_rz(wir_r, vas);

        return ret;
      }
    }
  }
示例#3
0
文件: zuse.c 项目: aaronlifton/urbit
/* zuse_fire_gene(): execute a stateless kernel expression, as a gene.
*/
void                                                              //  transfer
zuse_fire_gene(u2_wire wir_r, 
               u2_noun sho,                                       //  retain
               u2_noun hos,                                       //  retain
               u2_noun gen)                                       //  retain
{
  u2_noun gam = _zuse_nu_mint(wir_r, sho, u2_h(hos), c3__noun, gen); 

  if ( u2_none == gam ) {
    fprintf(stderr, "  {fire: mint failed}\n");
    return;
  }
  {
    u2_noun typ = u2_h(gam);
    u2_noun fol = u2_t(gam);

    _zuse_dump_type(wir_r, u2_t(sho), 0, typ);
    u2_bx_spot(wir_r, u2_nul);
    {
      u2_noun som = u2_nk_nock(wir_r, u2_rx(wir_r, u2_t(hos)), fol);

      if ( u2_none == som ) {
        fprintf(stderr, "  {fire: nock failed}\n");
      }
      else {
        u2_err(wir_r, 0, som);
        hos = u2_none;
      }
      u2_bx_show(wir_r);
      u2_bx_spot(wir_r, u2_nul);

      u2_rz(wir_r, gam);
      u2_rz(wir_r, som);
    }
  }
}
示例#4
0
文件: cue.c 项目: readevalprint/urbit
  u2_noun                                                         //  transfer
  j2_mby(Pt5, cue)(u2_wire wir_r,
                   u2_atom a)                                     //  retain
  {
    T_r = u2_na_make();

    u2_noun x = _cue_in(wir_r, a, _0);
    u2_noun y = u2_rx(wir_r, u2_h(u2_t(x)));

    u2_na_take(T_r);
    T_r = 0;

    u2_rz(wir_r, x);
    return y;
  }
示例#5
0
文件: ut_mint.c 项目: mnemnion/urbit
  static u2_noun 
  _mint_grow(u2_wire wir_r,
             u2_noun van,
             u2_noun sut,
             u2_noun gol,
             u2_atom mel,
             u2_noun ruf,
             u2_noun dab)
  {
    u2_noun dan = _mint_in(wir_r, van, sut, c3__noun, ruf);
    u2_noun p_dan = u2_h(dan);
    u2_noun q_dan = u2_t(dan);
    u2_noun toc = _mint_core
      (wir_r, u2_rx(wir_r, p_dan),
              u2_bt(wir_r, c3__gold, 
                           u2_rx(wir_r, p_dan), 
                           u2_bc(wir_r, u2_nul, u2_rx(wir_r, dab))));
    u2_noun dez = _mint_bake(wir_r, van, toc, dab);
    u2_noun zod = u2_bc(wir_r, 1, dez);
    u2_noun cot = _mint_core
      (wir_r, u2_rx(wir_r, p_dan),
              u2_bt(wir_r, mel, 
                           u2_rx(wir_r, p_dan), 
                           u2_bc(wir_r, u2_rx(wir_r, dez), 
                                        u2_rx(wir_r, dab))));
    u2_noun ret = u2_bc
      (wir_r, 
       _mint_nice(wir_r, van, gol, cot),
       j2_mby(Pt6, cons)(wir_r, zod, q_dan));

    u2_rz(wir_r, zod);
    u2_rz(wir_r, toc);
    u2_rz(wir_r, dan);

    return ret;
  }
示例#6
0
文件: hill.c 项目: aaronlifton/urbit
/* _hill_z_make_txt(): execute string against shoe.
*/
static hi_shoz                                                    //  produce
_hill_z_make_txt(u2_wire wir_r,
                 hi_shoz sho,                                     //  retain
                 u2_atom txt)                                     //  retain
{
  u2_noun gen, ret;

  if ( u2_none == (gen = j2_mbc(PitZ, ream)(wir_r, txt)) ) {
    fprintf(stderr, "{%s: parser failed}\n", FileZ);
    return u2_bl_bail(wir_r, c3__fail);
  }
  ret = _hill_z_make_gen(wir_r, sho, gen);

  u2_rz(wir_r, gen);
  return ret;
}
示例#7
0
static u2_noun                                                  //  produce
_rest_in_fork(u2_wire wir_r,
              u2_noun nog,                                      //  retain
              u2_noun fub)                                      //  retain
{
    if ( u2_no == u2_dust(nog) ) {
        return fub;
    } else {
        u2_noun buf = _rest_in_fork
                      (wir_r,
                       u2_t(nog),
                       j2_mby(Pt6, fork)(wir_r, u2_h(nog), fub));

        u2_rz(wir_r, fub);
        return buf;
    }
}
示例#8
0
文件: ut_mull.c 项目: mnemnion/urbit
  u2_flag                                                         //  transfer
  j2_mcx(Pt6, ut, mull)(u2_wire wir_r, 
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain
                        u2_noun gol,                              //  retain
                        u2_noun dox,                              //  retain
                        u2_noun gen)                              //  retain
  {
    if ( u2_no == _mull_vet(wir_r, van) ) {
      return u2_yes;
    } else {
      u2_noun mul = _mull_in(wir_r, van, sut, gol, dox, gen);

      u2_rz(wir_r, mul);
      return u2_yes;
    }
  }
示例#9
0
文件: ut_heal.c 项目: Gruelty/urbit
  static u2_noun
  _heal_by(u2_wire wir_r,
           u2_noun van,
           u2_noun sut,
           u2_noun qog, 
           u2_noun ref)
  {
    u2_noun p_sut, q_sut;

    if ( u2_no == u2_dust(sut) ) {
      return u2_bl_error(wir_r, "heal-name");
    }
    else switch ( u2_h(sut) ) {
      default: return u2_bl_error(wir_r, "heal-name");

      case c3__core:
      {
        return u2_rx(wir_r, ref);
      }
      case c3__face: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
      {
        if ( u2_yes == u2_sing(p_sut, u2_t(qog)) ) {
          return j2_mby(Pt6, face)(wir_r, p_sut, ref);
        }
        else return u2_bl_error(wir_r, "heal-name");
      }
      case c3__fine: 
      case c3__hold: {
        u2_noun rep = j2_mcy(Pt6, ut, repo)(wir_r, van, sut);
        u2_noun ret = _heal_by(wir_r, van, rep, qog, ref);

        u2_rz(wir_r, rep);
        return ret;
      }
      case c3__fork: u2_bi_cell(wir_r, u2_t(sut), &p_sut, &q_sut);
      {
        u2_noun dis = _heal_by(wir_r, van, p_sut, qog, ref);
        u2_noun dat = _heal_by(wir_r, van, q_sut, qog, ref);
        u2_noun ret = j2_mby(Pt6, fork)(wir_r, dis, dat);

        u2_rl_lose(wir_r, dis);
        u2_rl_lose(wir_r, dat);
        return ret;
      }
    }
  }
示例#10
0
文件: dash.c 项目: MacTop/urbit
/* u2_ds_fire():
**
**   Fire formula from core.
*/
u2_weak                                                           //  produce
u2_ds_fire(u2_wire     wir_r,
           u2_noun     cor,                                       //  retain
           const c3_c* tam_c)                                     //  retain
{
  u2_noun fol = u2_ds_look(wir_r, cor, tam_c);

  if ( u2_none == fol ) {
    return u2_none;
  }
  else {
    u2_noun pro = u2_nk_nock(wir_r, u2_rx(wir_r, cor), fol);

    u2_rz(wir_r, fol);
    return pro;
  }
}
示例#11
0
文件: parse.c 项目: mnemnion/urbit
/* bend
*/
  u2_noun                                                         //  produce
  j2_mcx(Pt5, bend, fun)(u2_wire wir_r,
                         u2_noun raq,                             //  retain
                         u2_noun vex,                             //  retain
                         u2_noun sab)                             //  retain
  {
    u2_noun p_vex, q_vex;

    u2_bi_cell(wir_r, vex, &p_vex, &q_vex);
    if ( u2_no == u2_dust(q_vex) ) {
      return u2_rx(wir_r, vex);
    } else {
      u2_noun uq_vex = u2_t(q_vex);
      u2_noun puq_vex, quq_vex;
      u2_noun yit, yur;
      u2_noun p_yit, q_yit;
      u2_noun ret;

      u2_bi_cell(wir_r, uq_vex, &puq_vex, &quq_vex);
      yit = u2_bl_good(wir_r, u2_nk_mong(wir_r, sab, u2_rx(wir_r, quq_vex)));
      
      u2_bi_cell(wir_r, yit, &p_yit, &q_yit);
      yur = _last(wir_r, p_vex, p_yit);

      if ( u2_no == u2_dust(q_yit) ) {
        ret = u2_bc(wir_r, yur, u2_rx(wir_r, q_vex));
      } 
      else {
        u2_noun uq_yit = u2_t(q_yit);
        u2_noun puq_yit, quq_yit;
         
        u2_bi_cell(wir_r, uq_yit, &puq_yit, &quq_yit);
        ret = u2_bq(wir_r, yur,
                           u2_nul,
                           u2_bl_good
                            (wir_r, 
                             u2_nk_mong
                               (wir_r, raq, 
                                       u2_bc(wir_r, u2_rx(wir_r, puq_vex),
                                                    u2_rx(wir_r, puq_yit)))),
                           u2_rx(wir_r, quq_yit));
      }
      u2_rz(wir_r, yit);
      return ret;
    }
  }
示例#12
0
文件: hill.c 项目: aaronlifton/urbit
/* _hill_print_bean(): print wrapper for flat meaning.
*/
static void
_hill_print_bean(u2_wire wir_r,
                 FILE*   fil_f,                                   //  retain
                 u2_noun ben)                                     //  retain
{
#if 0
  u2_noun wal = _hill_a_fly(wir_r, Hill->soa, ben, _hill_columns());
#else
  //  This will bail safely if the benl is bad, rather than 
  //  recursing back into _hill_nock().
  //
  u2_noun wal = j2_mcy(PitA, to, fly)(wir_r, ben, _hill_columns());
#endif
  _hill_print_wall(wir_r, fil_f, "", wal);
  u2_rz(wir_r, wal);
  return;
}
示例#13
0
文件: hill.c 项目: aaronlifton/urbit
/* _hill_print_mean(): print wrapper for meta-meaning.
*/
static void
_hill_print_mean(u2_wire wir_r,
                 FILE*   fil_f,                                   //  retain
                 u2_noun mon)                                     //  retain
{
  if ( u2_yes == u2_dust(mon) ) {
    u2_noun ben = u2_nk_nock(wir_r, u2_rx(wir_r, mon), u2_t(mon));

    if ( u2_none != ben ) {
      _hill_print_bean(wir_r, fil_f, ben);
      u2_rz(wir_r, ben);
      return;
    }
    else fprintf(fil_f, "  {maen!}\n");
  }
  fprintf(fil_f, "  {mean!}\n");
}
示例#14
0
文件: ut_mint.c 项目: mnemnion/urbit
  static u2_noun                                                  //  produce
  _mint_coke(u2_wire wir_r,
             u2_noun nug)                                         //  submit
  {
    u2_atom axe;

    if ( 0 == u2_h(nug) ) {
      axe = u2_t(nug);
    } else if ( 10 == u2_h(nug) ) {
      u2_noun xin = u2_rx(wir_r, u2_t(u2_t(nug)));

      axe = _mint_coke(wir_r, xin);
    }
    else {
      return u2_bl_error(wir_r, "mint-coke");
    }
    u2_rz(wir_r, nug);
    return axe;
  }
示例#15
0
文件: hill.c 项目: aaronlifton/urbit
/* _hill_z_mint_gen(): mint `gen` to `[type form]` with PitZ jets.
*/
static u2_noun                                                    //  produce
_hill_z_mint_gen(u2_wire wir_r,
                 u2_noun sut,                                     //  retain
                 u2_noun gol,                                     //  retain
                 u2_noun gen)                                     //  retain
{
  u2_noun gam;
  u2_noun van = u2_bc
    (wir_r, u2_bc(wir_r, 
                  c3__blur,
                  u2_bc(wir_r, u2_bq(wir_r, _0, _0, _0, _0),  // bq for 268 on
                               u2_bc(wir_r, _0, 42))),
            87);

  gam = j2_mcy(PitZ, ut, mint)(wir_r, van, sut, gol, gen);
  u2_rz(wir_r, van);

  return gam;
}
示例#16
0
文件: hill.c 项目: aaronlifton/urbit
/* _hill_z_mint_txt(): mint `txt` to `[type form]` with PitZ jets.
*/
static u2_noun                                                    //  produce
_hill_z_mint_txt(u2_wire wir_r,
                 u2_noun sut,                                     //  retain
                 u2_noun gol,                                     //  retain
                 u2_atom txt)                                     //  retain
{
  u2_noun gen;

  if ( u2_none == (gen = j2_mbc(PitZ, ream)(wir_r, txt)) ) {
    fprintf(stderr, "{%s: parser failed}\n", FileZ);
    return u2_bl_bail(wir_r, c3__fail);
  }
  else {
    u2_noun ret = _hill_z_mint_gen(wir_r, sut, gol, gen);

    u2_rz(wir_r, gen);
    return ret;
  }
}
示例#17
0
文件: bail.c 项目: MacTop/urbit
/* u2_bn_gort():
**
**  Call by core, depth, hook, molt list.
*/
u2_noun
u2_bn_gort(u2_wire     wir_r,
           u2_noun     cor,
           const c3_c* tam_c,
           ...)
{
  // XX: tested, but leaks.  Check memory protocol.
  //
  u2_noun fol = u2_bl_good(wir_r, u2_ds_look(wir_r, cor, tam_c));
  u2_noun gat = u2_bn_nock(wir_r, cor, fol);
  u2_noun tec;
  va_list vap;

  va_start(vap, tam_c);
  tec = u2_bn_molf(wir_r, gat, vap);
  va_end(vap);

  u2_rz(wir_r, fol);
  return u2_bn_nock(wir_r, tec, u2_t(tec));
}
示例#18
0
文件: nock.c 项目: sillsm/urbit
/* u2_nk_mong():
**
**   Call with new convention.
*/
u2_noun                                                           //  transfer
u2_nk_mong(u2_wire wir_r,
           u2_noun gat,                                           //  retain
           u2_noun sam)                                           //  transfer
{
    u2_noun cor, xip;

    cor = u2_rc
          (wir_r,
           u2_rx(wir_r, u2_sh(gat)),
           u2_rc(wir_r, sam, u2_rx(wir_r, u2_st(u2_st(gat)))));

    if ( u2_none != (xip = u2_ds_find(wir_r, cor)) ) {
        u2_noun pro = u2_ho_kick(wir_r, xip, cor, u2_cv_noc);

        u2_rz(wir_r, cor);
        return pro;
    }
    else return u2_nk_nock(wir_r, cor, u2_sh(gat));
}
示例#19
0
文件: ut_mull.c 项目: mnemnion/urbit
  static void
  _mull_bake(u2_wire wir_r, 
             u2_noun van,                                         //  retain
             u2_noun sut,                                         //  retain
             u2_noun dox,                                         //  retain
             u2_noun dab)                                         //  retain
  {
    if ( u2_nul != dab ) {
      u2_noun n_dab, l_dab, r_dab; 
 
      u2_as_trel(dab, &n_dab, &l_dab, &r_dab);
      if ( u2_no == u2_dust(n_dab) ) {
        u2_bl_bail(wir_r, c3__fail);
      } 
      else {
        u2_noun qn_dab = u2_t(n_dab);
        u2_noun pqn_dab = u2_t(qn_dab);   //  XX actual wing support
        u2_noun ppqn_dab = u2_h(pqn_dab);
        u2_noun qpqn_dab = u2_t(pqn_dab);
        u2_noun vad = (u2_yes == ppqn_dab)
                        ? _mull_in(wir_r, van, sut, c3__noun, dox, qpqn_dab)
                        : u2_nul;

        u2_rz(wir_r, vad);

        if ( (u2_nul == l_dab) && (u2_nul == r_dab) ) {
          return;
        }
        else if ( (u2_nul == l_dab) ) {
          _mull_bake(wir_r, van, sut, dox, r_dab);
        }
        else if ( (u2_nul == r_dab) ) {
          _mull_bake(wir_r, van, sut, dox, l_dab);
        }
        else {
          _mull_bake(wir_r, van, sut, dox, l_dab);
          _mull_bake(wir_r, van, sut, dox, r_dab);
        }
      }
    }
  }
示例#20
0
文件: ut_seek.c 项目: ngvrnd/urbit
  u2_noun                                                         //  transfer
  j2_mcy(Pt6, ut, seep)(u2_wire wir_r,
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain
                        u2_noun way,                              //  retain
                        u2_noun hyp)                              //  retain
  {
    u2_noun zar = j2_mcy(Pt6, ut, seek)(wir_r, van, sut, way, hyp);
    u2_noun p_zar = u2h(zar);
    u2_noun q_zar = u2t(zar);
    
    if ( u2_yes != u2h(q_zar) ) {
      return u2_cm_bail(c3__exit);
    }
    else {
      u2_noun ret = u2_bc(wir_r, u2_rx(wir_r, p_zar), u2_rx(wir_r, u2t(q_zar)));

      u2_rz(wir_r, zar);
      return ret;
    }
  }
示例#21
0
文件: in_tap.c 项目: mnemnion/urbit
/* functions
*/
  static u2_weak                                                  //  produce
  _tap_in(u2_wire wir_r,
          u2_noun a,                                              //  retain
          u2_noun b)                                              //  submit
  {
    if ( u2_nul == a ) {
      return b;
    } else {
      u2_noun l_a, n_a, r_a;

      if ( (u2_no == u2_as_trel(a, &n_a, &l_a, &r_a)) ) {
        u2_rz(wir_r, b);
        return u2_bl_bail(wir_r, c3__exit);
      } else {
        return _tap_in
          (wir_r, r_a, 
                  u2_rc(wir_r, u2_rx(wir_r, n_a), 
                               _tap_in(wir_r, l_a, b)));
      }
    } 
  }
示例#22
0
文件: ut_swab.c 项目: mnemnion/urbit
  static u2_noun                                                  //  produce
  _snub(u2_wire wir_r,
        u2_noun van,                                              //  retain
        u2_noun sut,                                              //  retain
        u2_noun peh,                                              //  retain
        u2_noun men,                                              //  retain
        u2_noun gen,                                              //  retain
        u2_noun gus)                                              //  retain
  {
#if 1
    return u2_rx(wir_r, gen);
#else
    if ( u2_no == u2_dust(men) ) {
      if ( u2_nul == gus ) {
        return u2_rx(wir_r, gen);
      } else {
        return u2_rx(wir_r, u2_t(gus));
      }
    }
    else {
      u2_noun i_men   = u2_h(men);
      u2_noun t_men   = u2_t(men);
      u2_noun pi_men  = u2_h(i_men);

      u2_noun nip = _snip(wir_r, van, pi_men, peh, gen);
      u2_noun nar = u2_bc(wir_r, u2_nul, nip);
      u2_noun ret;

      if ( u2_nul != gus ) {
        if ( u2_no == u2_sing(nip, u2_t(gus)) ) {
          return u2_bl_bail(wir_r, c3__exit);
        }
      }
      ret = _snub(wir_r, van, sut, peh, t_men, gen, nar);

      u2_rz(wir_r, nar);
      return ret;
    }
#endif
  }
示例#23
0
文件: parse.c 项目: mnemnion/urbit
/* here
*/
  u2_noun                                                         //  produce
  j2_mcx(Pt5, here, fun)(u2_wire wir_r,
                         u2_noun hez,                             //  retain
                         u2_noun sef,                             //  retain
                         u2_noun tub)                             //  retain
  {
    u2_noun vex = u2_bl_good(wir_r, u2_nk_mong(wir_r, sef, u2_rx(wir_r, tub)));
    u2_noun p_vex, q_vex;

    u2_bi_cell(wir_r, vex, &p_vex, &q_vex);

    if ( u2_no == u2_dust(q_vex) ) {
      return vex;
    }
    else {
      u2_noun uq_vex = u2_t(q_vex);
      u2_noun p_tub, q_tub;
      u2_noun puq_vex, quq_vex, pquq_vex;
      u2_noun gud, wag;
      u2_noun ret;

      u2_bi_cell(wir_r, tub, &p_tub, &q_tub);
      u2_bi_cell(wir_r, uq_vex, &puq_vex, &quq_vex);
      u2_bi_cell(wir_r, quq_vex, &pquq_vex, 0);
      gud = u2_bc(wir_r, 
                  u2_bt(wir_r, u2_nul, 
                               u2_rx(wir_r, p_tub), 
                               u2_rx(wir_r, pquq_vex)),
                  u2_rx(wir_r, puq_vex));

      wag = u2_bl_good(wir_r, u2_nk_mong(wir_r, hez, gud));
      ret = u2_bq(wir_r, u2_rx(wir_r, p_vex),
                         u2_nul,
                         wag,
                         u2_rx(wir_r, quq_vex));

      u2_rz(wir_r, vex);
      return ret;
    }
  }
示例#24
0
文件: ut_heal.c 项目: Gruelty/urbit
  static u2_noun
  _heal_as(u2_wire wir_r,
           u2_noun van,
           u2_noun sut,
           u2_noun qog,
           u2_atom axe,
           u2_noun ref)
  {
    if ( _1 == axe ) {
      if ( u2_nul == qog ) {
        return u2_rx(wir_r, ref);
      } else return _heal_by(wir_r, van, sut, qog, ref);
    }
    else {
      u2_atom now = j2_mbc(Pt3, cap)(wir_r, axe);
      u2_atom lat = j2_mbc(Pt3, mas)(wir_r, axe);
      u2_noun ret = _heal_to(wir_r, van, sut, u2_nul, qog, ref, now, lat);

      u2_rz(wir_r, lat);
      return ret;
    }
  }
/* functions
*/
  u2_noun                                                         //  transfer
  j2_mcx(Pt6, ut, tock)(u2_wire wir_r,
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain
                        u2_noun peh,                              //  retain
                        u2_noun mur,                              //  retain
                        u2_noun men)                              //  retain
  {
    u2_noun wib = _tock_in(wir_r, van, sut, peh, mur, men);
    u2_noun p_wib = u2_h(wib);
    u2_noun q_wib = u2_t(wib);

    if ( u2_nul == p_wib ) {
      return u2_bl_bail(wir_r, c3__exit);
    } else {
      u2_noun ret = u2_bc(wir_r, u2_rx(wir_r, u2_t(p_wib)),
                                 u2_rx(wir_r, q_wib));

      u2_rz(wir_r, wib);
      return ret;
    }
  }
示例#26
0
文件: hill.c 项目: aaronlifton/urbit
/* _hill_nock(): control and trace wrapper for interpreter.
*/
static u2_noun                                                    //  produce
_hill_nock(u2_wire wir_r,
           u2_noun bus,                                           //  retain
           u2_noun fol)                                           //  retain
{
  u2_noun pro;

  pro = u2_nk_nock(wir_r, u2_rx(wir_r, bus), fol);

  if ( u2_none != pro ) {
    return pro;
  }
  else {
    u2_ray kit_r = u2_bl_open(wir_r);

    if ( u2_bl_set(wir_r) ) {
      u2_bl_done(wir_r, kit_r);
      fprintf(stderr, "{trace failed!}\n");
    }
    else {
      u2_noun tax;
     
      fprintf(stderr, "{trace}\n");
      tax = u2_rx(wir_r, u2_wire_tax(wir_r));
      u2_wire_tax(wir_r) = u2_nul;

      _hill_print_trac(wir_r, stderr, tax);
      u2_rz(wir_r, tax);

      u2_bl_done(wir_r, kit_r);
    }

    u2_bl_bail(wir_r, c3__fail);
    return u2_none;
  }
}
示例#27
0
文件: zuse.c 项目: aaronlifton/urbit
/* zuse_boot_gene(): boot from present shoe and gene, producing new shoe.
*/
u2_noun                                                           //  transfer
zuse_boot_gene(u2_wire wir_r, 
               u2_noun sho,                                       //  retain
               u2_noun gen)                                       //  retain
{
  u2_noun gam = _zuse_nu_mint(wir_r, sho, c3__noun, c3__noun, gen); 

  if ( u2_none == gam ) {
    fprintf(stderr, "  {boot: mint failed}\n");
    u2_bx_show(wir_r);
    u2_bx_spot(wir_r, u2_nul);

    return u2_none;
  }

  {
    u2_noun typ = u2_h(gam);
    u2_noun fol = u2_t(gam);
    u2_noun cor = u2_nk_nock(wir_r, _0, u2_rx(wir_r, fol));   //  !!
    u2_noun hos;

    if ( u2_none == cor ) {
      fprintf(stderr, "  {boot: nock failed}\n");

      hos = u2_none;
      u2_bx_show(wir_r);
      u2_bx_spot(wir_r, u2_nul);
    }
    else {
      hos = u2_bc(wir_r, u2_rx(wir_r, typ), cor);
    }
    u2_rz(wir_r, gam);

    return hos;
  }
}
示例#28
0
文件: ut_seek.c 项目: ngvrnd/urbit
  u2_noun                                                         //  transfer
  j2_mcx(Pt6, ut, seek)(u2_wire wir_r, 
                        u2_noun van,                              //  retain
                        u2_noun sut,                              //  retain
                        u2_noun way,                              //  retain
                        u2_noun hyp)                              //  retain
  {
    if ( u2_nul == hyp ) {
      return u2_bt
        (wir_r, _1, u2_yes, u2_rx(wir_r, sut));
    }
    else if ( u2_no == u2_dust(hyp) ) {
      return u2_bl_bail(wir_r, c3__fail);
    }
    else {
      u2_noun i_hyp = u2_h(hyp);
      u2_noun t_hyp = u2_t(hyp);
      u2_noun zar; 
      u2_noun p_zar, q_zar;
      u2_noun yip, syp, ret;

      if ( u2_yes == u2_dust(i_hyp) ) {
        yip = u2_rx(wir_r, i_hyp);
      } else {
        yip = u2_bt(wir_r, u2_no, 0, u2_rx(wir_r, i_hyp));
      }

      zar = j2_mcx(Pt6, ut, seek)(wir_r, van, sut, way, t_hyp);
      u2_as_cell(zar, &p_zar, &q_zar);

#if 0
      if ( u2_yes == u2_h(yip) ) {
        sic = u2_nul;
      } else {
        // sic = _seek_silk(wir_r, van, u2_h(u2_t(yip)), zar);
        sic = u2_nul;
      }
      if ( u2_nul != sic ) {
        u2_rz(wir_r, yip);
        u2_rz(wir_r, zar);

        return u2_t(sic);
      }
#endif

      if ( u2_yes == u2_h(q_zar) ) {
        syp = u2_rx(wir_r, u2_t(q_zar));
      } else {
        u2_noun pq_zar, qq_zar;
        u2_noun wip;

        u2_as_cell(u2_t(q_zar), &pq_zar, &qq_zar);
        wip = _seek_flat(wir_r, qq_zar);
        syp = j2_mcy(Pt6, ut, fire)(wir_r, van, sut, wip);

        u2_rz(wir_r, wip);
      }

      if ( u2_no == u2_h(yip) ) {
        u2_noun p_yip, q_yip, hud;

        if ( u2_no == u2_as_cell(u2_t(yip), &p_yip, &q_yip) ) {
          return u2_bl_bail(wir_r, c3__fail);
        }
        hud = j2_mcy(Pt6, ut, fink)(wir_r, van, syp, p_yip, way, q_yip);
        {
          u2_noun p_hud, q_hud;

          u2_as_cell(hud, &p_hud, &q_hud);

          ret = u2_bc(wir_r, j2_mbc(Pt3, peg)(wir_r, p_zar, p_hud), 
                             u2_rx(wir_r, q_hud));
          u2_rz(wir_r, hud);
        }
      } 
      else {
        u2_noun p_yip = u2_t(yip);

        if ( u2_no == u2_stud(p_yip) ) {
          return u2_bl_bail(wir_r, c3__fail);
        }
        else {
          ret = u2_bt
            (wir_r, j2_mbc(Pt3, peg)(wir_r, p_zar, p_yip),
                    u2_yes,
                    j2_mcy(Pt6, ut, peek)(wir_r, van, syp, way, p_yip));
        }
      }
      u2_rz(wir_r, yip);
      u2_rz(wir_r, syp);
      u2_rz(wir_r, zar);
      return ret;
    }
  }
示例#29
0
文件: ut_nest.c 项目: mnemnion/urbit
  static u2_flag
  _nest_cong(u2_wire wir_r,
             u2_noun van,
             u2_noun sut,
             u2_noun ref,
             u2_noun gil)
  {
    u2_noun p_sut, q_sut, p_ref, q_ref;
    u2_noun pq_sut, qq_sut, rq_sut;
    u2_noun pq_ref, qq_ref, rq_ref;
    u2_noun prq_sut, qrq_sut, prq_ref, qrq_ref;
    u2_flag ret;

    u2_bi_trel(wir_r, sut, 0, &p_sut, &q_sut);
    u2_bi_trel(wir_r, ref, 0, &p_ref, &q_ref);

    u2_bi_trel(wir_r, q_sut, &pq_sut, &qq_sut, &rq_sut);
    u2_bi_trel(wir_r, q_ref, &pq_ref, &qq_ref, &rq_ref);

    u2_bi_cell(wir_r, rq_sut, &prq_sut, &qrq_sut);
    u2_bi_cell(wir_r, rq_ref, &prq_ref, &qrq_ref);

    if ( u2_yes == u2_sing(q_sut, q_ref) ) {
      return _nest_dext(wir_r, van, p_sut, p_ref, gil);
    }
    else if ( (u2_no == _nest_dext(wir_r, van, qq_sut, p_sut, gil)) ||
              (u2_no == _nest_dext(wir_r, van, p_sut, qq_sut, gil)) ||
              (u2_no == _nest_dext(wir_r, van, qq_ref, p_ref, gil)) )
    {
      return u2_no;
    }
    else {
      if ( (pq_sut != pq_ref) && (c3__gold != pq_ref) ) {
        return u2_no;
      }
      else {
        u2_noun tus = u2_bt(wir_r, c3__core, 
                                   u2_rx(wir_r, qq_sut), 
                                   u2_rx(wir_r, q_sut));
        u2_noun fer = u2_bt(wir_r, c3__core, 
                                   u2_rx(wir_r, qq_ref), 
                                   u2_rx(wir_r, q_ref));

        ret = _nest_cram(wir_r, van, tus, fer, qrq_sut, qrq_ref, gil);
        u2_rz(wir_r, tus);
        u2_rz(wir_r, fer);

        if ( u2_no == ret ) {
          return u2_no;
        }
        else {
          switch ( pq_sut ) {
            default: return u2_bl_bail(wir_r, c3__fail);

            case c3__gold: {
              return u2_and(_nest_dext(wir_r, van, qq_sut, qq_ref, gil),
                            _nest_dext(wir_r, van, qq_ref, qq_sut, gil));
            }
            case c3__iron: {
              u2_noun s_sam = j2_mcy(Pt6, ut, peek)
                                      (wir_r, van, qq_sut, c3__rite, _3);
              u2_noun r_sam = j2_mcy(Pt6, ut, peek)
                                      (wir_r, van, qq_ref, c3__rite, _3);

              return _nest_dext(wir_r, van, r_sam, s_sam, gil);
            }
            case c3__lead: {
              return u2_yes;
            }
            case c3__zinc: {
              u2_noun s_pal = j2_mcy(Pt6, ut, peek)
                                      (wir_r, van, qq_sut, c3__read, _3);
              u2_noun r_pal = j2_mcy(Pt6, ut, peek)
                                      (wir_r, van, qq_ref, c3__read, _3);

              return _nest_dext(wir_r, van, s_pal, r_pal, gil);
            }
          }
        }
      }
    }
  }
示例#30
0
文件: ut_mint.c 项目: mnemnion/urbit
  static u2_noun                                                  //  produce
  _mint_in(u2_wire wir_r, 
           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) && 
         !((u2_yes == u2_dust(gen)) && (c3__zpcb == u2_h(gen))) )
    {
      if ( (u2_no == _mint_vet(wir_r, van))
           || ((u2_yes == u2_dust(gen)) && 
               ((c3__zpfs == u2_h(gen)) || (c3__zpzp == u2_h(gen)))) )
      {
        return u2_bt(wir_r, c3__void, _0, _0);
      }
      else {
        return u2_bl_error(wir_r, "mint-vain");
      }
    }

    if ( u2_no == u2_dust(gen) ) {
      u2_noun ter = u2_frag(u2_cw_con_2, van);
      u2_noun rex = j2_mcy(Pt6, ap, open)(wir_r, ter, gen);

      ret = _mint_in(wir_r, van, sut, gol, rex);
      u2_rl_lose(wir_r, rex);

      return ret;
    } 
    else if ( u2_yes == u2_dust(u2_h(gen)) ) {
      _mint_used(wir_r);
      {
        u2_noun hed = _mint_in(wir_r, van, sut, c3__noun, u2_h(gen));
        u2_noun tal = _mint_in(wir_r, van, sut, c3__noun, u2_t(gen));
        u2_noun typ = j2_mby(Pt6, cell)(wir_r, u2_h(hed), u2_h(tal));

        ret = u2_bc
          (wir_r,
           _mint_nice(wir_r, van, gol, typ),
           j2_mby(Pt6, cons)(wir_r, u2_t(hed), u2_t(tal)));

        u2_rl_lose(wir_r, hed);
        u2_rl_lose(wir_r, tal);

        return ret;
      }
    } else switch ( u2_h(gen) ) {
      default: {
        u2_noun ter = u2_frag(u2_cw_con_2, van);
        u2_noun rex = j2_mcy(Pt6, ap, open)(wir_r, ter, gen);

        if ( u2_yes == u2_sing(rex, gen) ) {
#if 1
          u2_noun zix = j2_mcy(Pt6, ut, shep)
                (wir_r, van, "gene", 'q', u2_rx(wir_r, gen));

          u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, zix));
          return u2_bl_error(wir_r, "mint-open");
#else
          u2_err(wir_r, "h", u2_h(gen));
          return u2_bl_bail(wir_r, c3__fail);
#endif
        }
        ret = _mint_in(wir_r, van, sut, gol, rex);
        u2_rl_lose(wir_r, rex);

        return ret;
      }
      
      case c3__wtcn: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun vol = _mint_corn(wir_r, van, sut, q_gen);
        u2_noun axe = _mint_coke(wir_r, vol);
        u2_noun wam = j2_mcy(Pt6, ut, play)(wir_r, van, sut, p_gen);

        ret = u2_bc
          (wir_r,
           _mint_nice(wir_r, van, gol, _mint_flag(wir_r)),
           j2_mcy(Pt6, ut, fish)(wir_r, van, wam, axe));

        u2_rl_lose(wir_r, axe);
        u2_rl_lose(wir_r, wam);
        return ret;
      }
      case c3__wtcl: u2_bi_trel(wir_r, u2_t(gen), &p_gen, &q_gen, &r_gen);
      _mint_used(wir_r);
      {
        u2_noun bol = _mint_flag(wir_r);
        u2_noun nor = _mint_in(wir_r, van, sut, bol, p_gen);
        u2_noun fex = j2_mcy(Pt6, ut, gain)(wir_r, van, sut, p_gen);
        u2_noun wux = j2_mcy(Pt6, ut, lose)(wir_r, van, sut, p_gen);
        u2_noun duy = (c3__void == fex)
                        ? ( (c3__void == wux)
                             ?  u2_bc(wir_r, _0, _0)
                             :  u2_bc(wir_r, _1, _1) )
                        : ( (c3__void == wux)
                            ?  u2_bc(wir_r, _1, _0)
                            :  u2_rx(wir_r, u2_t(nor)) );
        u2_noun hiq = _mint_in(wir_r, van, fex, gol, q_gen);
        u2_noun ran = _mint_in(wir_r, van, wux, gol, r_gen);

        ret = u2_bc
          (wir_r, j2_mby(Pt6, fork)(wir_r, u2_h(hiq), u2_h(ran)),
                  _mint_cond(wir_r, duy, 
                                    u2_rx(wir_r, u2_t(hiq)),
                                    u2_rx(wir_r, u2_t(ran))));

        u2_rl_lose(wir_r, ran);
        u2_rl_lose(wir_r, hiq);
        u2_rl_lose(wir_r, nor);
        u2_rl_lose(wir_r, wux);
        u2_rl_lose(wir_r, fex);
        u2_rl_lose(wir_r, bol);

        return ret;
      }
      case c3__clhp: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun hed = _mint_in(wir_r, van, sut, c3__noun, p_gen);
        u2_noun tal = _mint_in(wir_r, van, sut, c3__noun, q_gen);
        u2_noun typ = j2_mby(Pt6, cell)(wir_r, u2_h(hed), u2_h(tal));

        ret = u2_bc
          (wir_r,
           _mint_nice(wir_r, van, gol, typ),
           j2_mby(Pt6, cons)(wir_r, u2_t(hed), u2_t(tal)));

        u2_rl_lose(wir_r, hed);
        u2_rl_lose(wir_r, tal);

        return ret;
      }
      case c3__dtts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun typ = _mint_nice(wir_r, van, gol, _mint_flag(wir_r));

        return u2_bc
          (wir_r, 
           typ,
           u2_bt(wir_r, _5, _mint_corn(wir_r, van, sut, p_gen),
                            _mint_corn(wir_r, van, sut, q_gen)));
      }
      case c3__dtwt: p_gen = u2_t(gen);
      _mint_used(wir_r);
      {
        u2_noun typ = _mint_nice(wir_r, van, gol, _mint_flag(wir_r));

        return u2_bc
          (wir_r, 
           typ,
           u2_bc(wir_r, _3, _mint_corn(wir_r, van, sut, p_gen)));
      }
      case c3__dtkt: p_gen = u2_t(gen);
      _mint_used(wir_r);
      {
        u2_noun tom = c3__noun;
        u2_noun sam = _mint_in(wir_r, van, sut, tom, p_gen);

        ret = u2_bc
          (wir_r, 
           _mint_nice(wir_r, van, gol, tom),
           u2_bc(wir_r, _11, u2_rx(wir_r, u2_t(sam))));
        
        u2_rz(wir_r, sam);
        return ret;
      }
      case c3__dtls: p_gen = u2_t(gen);
      _mint_used(wir_r);
      {
        u2_noun tom = u2_bc(wir_r, c3__atom, u2_blip);
        u2_noun sam = _mint_in(wir_r, van, sut, tom, p_gen);

        ret = u2_bc
          (wir_r, 
           _mint_nice(wir_r, van, gol, tom),
           u2_bc(wir_r, _4, u2_rx(wir_r, u2_t(sam))));
        
        u2_rz(wir_r, sam);
        return ret;
      }
      case c3__dtsg: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun boc = (u2_no == u2_stud(q_gen)) 
                        ? c3__noun
                        : u2_bc(wir_r, c3__atom, u2_rx(wir_r, p_gen));
        u2_noun typ = j2_mby(Pt6, cube)(wir_r, q_gen, boc);
        u2_noun ret = 
            u2_bc(wir_r,
                  _mint_nice(wir_r, van, gol, typ),
                  u2_bc(wir_r, _1, u2_rx(wir_r, q_gen)));

        u2_rz(wir_r, boc);
        return ret;
      }
      case c3__dttr: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        return u2_bc
          (wir_r, 
           _mint_nice(wir_r, van, gol, c3__noun),
           u2_bt(wir_r, _2, _mint_corn(wir_r, van, sut, p_gen),
                            _mint_corn(wir_r, van, sut, q_gen)));
      }
      case c3__dtpt: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun typ = j2_mcy(Pt6, ut, play)(wir_r, van, sut, gen);
        u2_noun ret = 
            u2_bc(wir_r,
                  _mint_nice(wir_r, van, gol, typ),
                  u2_bc(wir_r, _1, u2_rx(wir_r, q_gen)));

        return ret;
      }
      case c3__ktdt: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun wit = j2_mcy(Pt6, ut, play)(wir_r, van, sut, p_gen);
        u2_noun nep = j2_mcy(Pt6, ut, snap)(wir_r, van, wit, q_gen);
        u2_noun ret = _mint_in(wir_r, van, sut, gol, nep);

        u2_rz(wir_r, nep);
        u2_rz(wir_r, wit);
        return ret;
      }
      case c3__ktbr: p_gen = u2_t(gen);
      _mint_used(wir_r);
      {
        u2_noun ryd = _mint_in(wir_r, van, sut, gol, p_gen);
        u2_noun tyf = j2_mcy(Pt6, ut, wrap)(wir_r, van, u2_h(ryd), c3__iron);
        u2_noun pro = u2_bc(wir_r, tyf, u2_rx(wir_r, u2_t(ryd)));

        u2_rz(wir_r, ryd);
        return pro;
      }
      case c3__ktpm: p_gen = u2_t(gen);
      _mint_used(wir_r);
      {
        u2_noun ryd = _mint_in(wir_r, van, sut, gol, p_gen);
        u2_noun tyf = j2_mcy(Pt6, ut, wrap)(wir_r, van, u2_h(ryd), c3__zinc);
        u2_noun pro = u2_bc(wir_r, tyf, u2_rx(wir_r, u2_t(ryd)));

        u2_rz(wir_r, ryd);
        return pro;
      }
      case c3__ktwt: p_gen = u2_t(gen);
      _mint_used(wir_r);
      {
        u2_noun ryd = _mint_in(wir_r, van, sut, gol, p_gen);
        u2_noun tyf = j2_mcy(Pt6, ut, wrap)(wir_r, van, u2_h(ryd), c3__lead);
        u2_noun pro = u2_bc(wir_r, tyf, u2_rx(wir_r, u2_t(ryd)));

        u2_rz(wir_r, ryd);
        return pro;
      }
      case c3__ktts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun vat = _mint_in(wir_r, van, sut, gol, q_gen);
     
        ret = u2_bc
          (wir_r,
           u2_bt(wir_r, c3__face,
                        u2_rx(wir_r, p_gen), 
                        u2_rx(wir_r, u2_h(vat))),
           u2_rx(wir_r, u2_t(vat)));

        u2_rl_lose(wir_r, vat);
        return ret;
      }
      case c3__ktsg: p_gen = u2_t(gen);
      _mint_used(wir_r);
      {
        u2_noun nef = _mint_in(wir_r, van, sut, gol, p_gen);
        u2_noun p_nef = u2_h(nef);
        u2_noun q_nef = u2_t(nef);
        u2_noun fom;

        {
          u2_noun cag = j2_mcy(Pt6, ut, burn)(wir_r, van, sut);
          u2_noun wim = u2_cn_moch(cag, u2k(q_nef));

          if ( 0 == u2h(wim) ) {
            fom = u2nc(1, u2k(u2t(wim)));
          } else {
            fom = u2k(q_nef);
          }
          u2z(wim);
        }
        ret = u2_bc(wir_r, u2_rx(wir_r, p_nef), fom);
 
        u2_rz(wir_r, nef);
        return ret;
      }
      case c3__ktls: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun hif = j2_mcy(Pt6, ut, play)(wir_r, van, sut, p_gen);
        u2_noun zel = _mint_in(wir_r, van, sut, hif, q_gen);
        u2_noun ret = u2_bc(wir_r, hif, u2_rx(wir_r, u2_t(zel)));

        u2_rz(wir_r, zel);
        return ret;
      }
      case c3__tsgr: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun fid = _mint_in(wir_r, van, sut, c3__noun, p_gen);
        u2_noun p_fid = u2_h(fid);
        u2_noun q_fid = u2_t(fid);
        u2_noun dov = _mint_in(wir_r, van, p_fid, gol, q_gen);
        u2_noun p_dov = u2_h(dov);
        u2_noun q_dov = u2_t(dov);

        ret = u2_bc
          (wir_r, u2_rx(wir_r, p_dov), 
                  j2_mbc(Pt6, comb)(wir_r, q_fid, q_dov));

        u2_rl_lose(wir_r, fid); 
        u2_rl_lose(wir_r, dov);
        return ret;
      }
      case c3__cnts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun sec = j2_mcy(Pt6, ut, seek)(wir_r, van, sut, c3__read, p_gen);
        u2_noun lar = _mint_foil(wir_r, sec);
        u2_noun p_lar = u2_h(lar);
        u2_noun q_lar = u2_t(lar);
        u2_noun pq_lar = u2_h(q_lar);
        u2_noun qq_lar = u2_t(q_lar);
        u2_noun mew = j2_mcy(Pt6, ut, swab)(wir_r, van, sut, qq_lar, q_gen);
        u2_noun yom = _mint_edit
          (wir_r, van, sut, mew, p_lar, u2_rx(wir_r, qq_lar), u2_nul);
        u2_noun p_yom = u2_h(yom);
        u2_noun q_yom = u2_t(yom);
        u2_noun ret = u2_bc
          (wir_r, _mint_nice(wir_r, van, gol, u2_rx(wir_r, p_yom)),
                  (_0 == pq_lar) ? u2_rx(wir_r, q_yom)
                                 : u2_bt(wir_r, _9,
                                                u2_rx(wir_r, pq_lar),
                                                u2_rx(wir_r, q_yom)));
                  
        u2_rz(wir_r, yom);
        u2_rz(wir_r, mew);
        u2_rz(wir_r, lar);

        return ret;
      }
      case c3__pmcl: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun ruf = u2_bt
          (wir_r, c3__clhp, 
                  u2_bc(wir_r, u2_nul, _1),
                  u2_rx(wir_r, p_gen));
        u2_noun ret = _mint_grow(wir_r, van, sut, gol, c3__zinc, ruf, q_gen);

        u2_rz(wir_r, ruf);
        return ret;
      }
      case c3__brcn: p_gen = u2_t(gen);
      _mint_used(wir_r);
      {
        u2_noun ruf = u2_bc(wir_r, u2_nul, _1);

        ret = _mint_grow(wir_r, van, sut, gol, c3__gold, ruf, p_gen);
        u2_rz(wir_r, ruf);

        return ret;
      }
      case c3__pmcn: p_gen = u2_t(gen);
      _mint_used(wir_r);
      {
        u2_noun ruf = u2_bc(wir_r, u2_nul, _1);

        ret = _mint_grow(wir_r, van, sut, gol, c3__lead, ruf, p_gen);
        u2_rz(wir_r, ruf);

        return ret;
      }
      case c3__pmls: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun ruf = u2_bt
          (wir_r, c3__clhp, 
                  u2_bc(wir_r, u2_nul, _1),
                  u2_rx(wir_r, p_gen));
        u2_noun ret = _mint_grow(wir_r, van, sut, gol, c3__iron, ruf, q_gen);

        u2_rz(wir_r, ruf);
        return ret;
      }
      case c3__sggr: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun hum = _mint_in(wir_r, van, sut, gol, q_gen);
        u2_noun bez;
      
          if ( u2_yes == u2_stud(p_gen) ) {
            bez = u2_rx(wir_r, p_gen);
          } else {
            bez = u2_bc(wir_r, u2_rx(wir_r, u2_h(p_gen)),
                               _mint_corn(wir_r, van, sut, u2_t(p_gen)));
          }
          ret = u2_bc(wir_r, 
                      u2_rx(wir_r, u2_h(hum)),
                      u2_bt(wir_r, _10, bez, u2_rx(wir_r, u2_t(hum))));
        
        u2_rl_lose(wir_r, hum);
        return ret;
      }
      case c3__zpts: p_gen = u2_t(gen);
      _mint_used(wir_r);
      {
        u2_noun von = u2_bn_molt(wir_r, van, j2_ut_van_vet, u2_no, 0);
        u2_noun sev = _mint_corn(wir_r, von, sut, p_gen);

        u2_rz(wir_r, von);
        return u2_bc(wir_r, c3__noun, u2_bc(wir_r, _1, sev));
      }
      case c3__zpcm: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        return u2_bc
          (wir_r, 
           _mint_nice(wir_r, van, 
                             gol, 
                             j2_mcy(Pt6, ut, play)(wir_r, van, sut, p_gen)),
           u2_bc(wir_r, 1, u2_rx(wir_r, q_gen)));
      }
      case c3__zpcb: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      {
        u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, _mint_loc(wir_r, van, p_gen)));
        {
          u2_noun hum = _mint_in(wir_r, van, sut, gol, q_gen);
          u2_noun bez = u2_bt(wir_r, c3__spot, _1, u2_rx(wir_r, p_gen));

          ret = u2_bc(wir_r, 
                      u2_rx(wir_r, u2_h(hum)),
                      u2_bt(wir_r, _10, bez, u2_rx(wir_r, u2_t(hum))));

          u2_rz(wir_r, hum);
        }
        u2_bl_drop(wir_r);
        return ret;
      }
      case c3__zpcn:
      _mint_used(wir_r);
      {
        u2_noun pet   = u2_bn_hook(wir_r, van, "seed");
        u2_noun p_pet = u2_h(pet);
        u2_noun q_pet = u2_t(pet);
        u2_noun ret;

        ret = u2_bc(wir_r, _mint_nice(wir_r, van, gol, u2_rx(wir_r, p_pet)),
                           u2_bc(wir_r, _1, u2_rx(wir_r, q_pet)));

        u2_rz(wir_r, pet);
        return ret;
      }
      case c3__zpsm: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen);
      _mint_used(wir_r);
      {
        u2_noun vos   = _mint_in(wir_r, van, sut, c3__noun, q_gen);
        u2_noun zur   = j2_mcy(Pt6, ut, play)(wir_r, van, sut, p_gen);
        u2_noun p_vos = u2_h(vos);
        u2_noun q_vos = u2_t(vos);
        u2_noun waz   = u2_bc(wir_r, _1, u2_rx(wir_r, p_vos));
        u2_noun cig   = j2_mby(Pt6, cell)(wir_r, zur, p_vos);
        u2_noun ret;

        ret = u2_bc(wir_r,
                    _mint_nice(wir_r, van, gol, cig),
                    j2_mby(Pt6, cons)(wir_r, waz, q_vos));

        u2_rz(wir_r, waz);
        u2_rz(wir_r, zur);
        u2_rz(wir_r, vos);

        return ret;
      }
      case c3__zpfs: p_gen = u2_t(gen);
      _mint_used(wir_r);
      {
        if ( u2_yes == _mint_vet(wir_r, van) ) {
          u2_noun zur = j2_mcy(Pt6, ut, play)(wir_r, van, sut, p_gen);
          u2_noun dun = j2_mcy(Pt6, ut, dunq)(wir_r, van, "lost", zur);

          u2_bl_push(wir_r, u2_bc(wir_r, c3__mean, dun));
          return u2_bl_error(wir_r, "mint-lost");
        }
        else {
          return u2_bt(wir_r, c3__void, _0, _0);
        }
      }
      case c3__zpzp:
      _mint_used(wir_r);
      {
        return u2_bt(wir_r, c3__void, _0, _0);
      }
    }
  }