/* Code bitwise operations; they are all associative, so the function tries to put an integer constant as the 2nd operand (a K operand).  */
static void codebitwise(FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2, int line)
/* Code bitwise operations; they are all associative, so the function tries to put an integer constant as the 2nd operand (a K operand).  */
static void codebitwise(FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2, int line)
{
  int flip = 0;
  int v2;
  OpCode op;
  if (e1->k == VKINT && luaK_exp2RK(fs, e1)) {
    swapexps(e1, e2);
    flip = 1;
  }
  else if (!(e2->k == VKINT && luaK_exp2RK(fs, e2))) {
    op = cast(OpCode, opr + OP_ADD);
    codebinexpval(fs, op, e1, e2, line);
    return;
  }
  v2 = e2->u.info;
  op = cast(OpCode, opr + OP_ADDK);
  lua_assert(ttisinteger(&fs->f->k[v2]));
  finishbinexpval(fs, e1, e2, op, v2, flip, line, OP_MMBINK,
                  cast(TMS, opr + TM_ADD));
}