function luaY.forbody(A,c,r,p,n,x)local d={}local y=c.fs A:adjustlocalvars(c,3)A:checknext(c,"\084\075\095\068\079")local z=x and luaK:codeAsBx(y,"\079\080\095\070\079\082\080\082\069\080",r,luaK.NO_JUMP)or luaK:jump(y)A:enterblock(y,d,false)A:adjustlocalvars(c,n)luaK:reserveregs(y,n)A:block(c)A:leaveblock(y)luaK:patchtohere(y,z)local P=x and luaK:codeAsBx(y,"\079\080\095\070\079\082\076\079\079\080",r,luaK.NO_JUMP)or luaK:codeABC(y,"\079\080\095\084\070\079\082\076\079\079\080",r,0,n)luaK:fixline(y,p)luaK:patchlist(y,x and P or luaK:jump(y),z+1)end

function luaY:forbody(ls, base, line, nvars, isnum)
  -- forbody -> DO block
  local bl = {}  -- BlockCnt
  local fs = ls.fs
  self:adjustlocalvars(ls, 3)  -- control variables
  self:checknext(ls, "TK_DO")
  local prep = isnum and luaK:codeAsBx(fs, "OP_FORPREP", base, luaK.NO_JUMP)
                     or luaK:jump(fs)
  self:enterblock(fs, bl, false)  -- scope for declared variables
  self:adjustlocalvars(ls, nvars)
  luaK:reserveregs(fs, nvars)
  self:block(ls)
  self:leaveblock(fs)  -- end of scope for declared variables
  luaK:patchtohere(fs, prep)
  local endfor = isnum and luaK:codeAsBx(fs, "OP_FORLOOP", base, luaK.NO_JUMP)
                       or luaK:codeABC(fs, "OP_TFORLOOP", base, 0, nvars)
  luaK:fixline(fs, line)  -- pretend that `OP_FOR' starts the loop
  luaK:patchlist(fs, isnum and endfor or luaK:jump(fs), prep + 1)
end
