/* Convert 'nvar', a compiler index level, to its corresponding register. For that, search for the highest variable below that level that is in a register and uses its register index ('ridx') plus one.  */
static int reglevel(FuncState *fs, int nvar)
/* Convert 'nvar', a compiler index level, to its corresponding register. For that, search for the highest variable below that level that is in a register and uses its register index ('ridx') plus one.  */
static int reglevel(FuncState *fs, int nvar)
{
    Vardesc *vd = getlocalvardesc(fs, nvar);
    if (vd->vd.kind != RDKCTC)
      return vd->vd.ridx + 1;
  }
  return 0;
}