function luaK.storevar(r,o,a,x)local f=a.k if f=="\086\076\079\067\065\076"then r:freeexp(o,x)r:exp2reg(o,x,a.info)return elseif f=="\086\085\080\086\065\076"then local f=r:exp2anyreg(o,x)r:codeABC(o,"\079\080\095\083\069\084\085\080\086\065\076",f,a.info,0)elseif f=="\086\071\076\079\066\065\076"then local f=r:exp2anyreg(o,x)r:codeABx(o,"\079\080\095\083\069\084\071\076\079\066\065\076",f,a.info)elseif f=="\086\073\078\068\069\088\069\068"then local f=r:exp2RK(o,x)r:codeABC(o,"\079\080\095\083\069\084\084\065\066\076\069",a.info,a.aux,f)else assert(0)end r:freeexp(o,x)end

function luaK:storevar(fs, var, ex)
  local k = var.k
  if k == "VLOCAL" then
    self:freeexp(fs, ex)
    self:exp2reg(fs, ex, var.info)
    return
  elseif k == "VUPVAL" then
    local e = self:exp2anyreg(fs, ex)
    self:codeABC(fs, "OP_SETUPVAL", e, var.info, 0)
  elseif k == "VGLOBAL" then
    local e = self:exp2anyreg(fs, ex)
    self:codeABx(fs, "OP_SETGLOBAL", e, var.info)
  elseif k == "VINDEXED" then
    local e = self:exp2RK(fs, ex)
    self:codeABC(fs, "OP_SETTABLE", var.info, var.aux, e)
  else
    assert(0)  -- invalid var kind to store
  end
  self:freeexp(fs, ex)
end
