/* try to close a goto with existing labels; this solves backward jumps  */
static int findlabel(LexState *ls, int g)
/* try to close a goto with existing labels; this solves backward jumps  */
static int findlabel(LexState *ls, int g)
{
    Labeldesc *lb = &dyd->label.arr[i];
    if (eqstr(lb->name, gt->name)) {
      if (gt->nactvar > lb->nactvar &&
          (bl->upval || dyd->label.n > bl->firstlabel))
        luaK_patchclose(ls->fs, gt->pc, lb->nactvar);
      closegoto(ls, g, lb);
      return 1;
    }
  }
  return 0;
}