def _update_strings_dst(self, tb, dst, size, instruction):
        # Create labels.
        forward_lbl = Label('forward')
        backward_lbl = Label('backward')
        continue_lbl = Label('continue')

        end_addr = ReilImmediateOperand((instruction.address + instruction.size) << 8, self._arch_info.address_size + 8)

        # Define immediate registers.
        imm_one = tb.immediate(1, 1)

        # Define temporary registers.
        df_zero = tb.temporal(1)
        imm_tmp = tb.immediate(size/8, dst.size)
        dst_tmp = tb.temporal(dst.size)

        # Update destination pointer.
        tb.add(self._builder.gen_bisz(self._flags["df"], df_zero))
        tb.add(self._builder.gen_jcc(df_zero, forward_lbl))

        # Update backwards.
        tb.add(backward_lbl)
        tb.add(self._builder.gen_sub(dst, imm_tmp, dst_tmp))
        tb.add(self._builder.gen_str(dst_tmp, dst))

        # Jump to next instruction.
        tb.add(self._builder.gen_jcc(imm_one, end_addr))

        # Update forwards.
        tb.add(forward_lbl)
        tb.add(self._builder.gen_add(dst, imm_tmp, dst_tmp))
        tb.add(self._builder.gen_str(dst_tmp, dst))
dataset/ETHPy150Open programa-stic/barf-project/barf/barf/arch/x86/x86translator.py/X86Translator._update_strings_dst/original