

def _translate_sar(self, tb, instruction):
    oprnd0 = tb.read(instruction.operands[0])
    oprnd1 = tb.read(instruction.operands[1])
    imm0 = tb.immediate((2 ** (oprnd0.size - 1)), oprnd0.size)
    imm1 = tb.immediate(1, oprnd0.size)
    imm2 = tb.immediate((- 1), oprnd0.size)
    tmp0 = tb.temporal(oprnd0.size)
    tmp1 = tb.temporal(oprnd0.size)
    tmp2 = tb.temporal(oprnd0.size)
    tmp6 = tb.temporal(oprnd0.size)
    tmp3 = tb.temporal(oprnd0.size)
    tmp4 = tb.temporal(oprnd0.size)
    tmp5 = tb.temporal(oprnd0.size)
    tmp6 = tb.temporal(oprnd0.size)
    loop_lbl = tb.label('loop')
    tb.add(self._builder.gen_str(oprnd1, tmp0))
    tb.add(self._builder.gen_str(oprnd0, tmp1))
    tb.add(self._builder.gen_and(oprnd0, imm0, tmp2))
    tb.add(loop_lbl)
    tb.add(self._builder.gen_and(oprnd0, imm1, tmp6))
    tb.add(self._builder.gen_str(tmp6, self._flags['cf']))
    tb.add(self._builder.gen_bsh(tmp1, imm2, tmp3))
    tb.add(self._builder.gen_or(tmp3, tmp2, tmp1))
    tb.add(self._builder.gen_sub(tmp0, imm1, tmp0))
    tb.add(self._builder.gen_bisz(tmp0, tmp4))
    tb.add(self._builder.gen_xor(tmp4, imm1, tmp5))
    tb.add(self._builder.gen_jcc(self, loop_lbl))
    tb.add(self._builder.gen_str(tmp1, tmp6))
    if (self._translation_mode == FULL_TRANSLATION):
        self._update_sf(tb, oprnd0, oprnd0, tmp6)
        self._update_zf(tb, oprnd0, oprnd0, tmp6)
        self._update_pf(tb, oprnd0, oprnd0, tmp6)
        self._undefine_flag(tb, self._flags['af'])
    tb.write(instruction.operands[0], tmp6)

dataset/ETHPy150Open programa-stic/barf-project/barf/barf/arch/x86/x86translator.py X86Translator._translate_sar/VarMisuse@385/503 `tmp5`->`self`