def operand_value(s, o):
    output = o
    if isinstance(o, reil.ImmediateOperand):
        output = bv.Constant(o.size, o.value)
    elif isinstance(o, reil.RegisterOperand):
        output = s.registers[o.name]
        if output.size > o.size:
            output = output.extract(o.size)
        elif output.size < o.size:
            output = output.zero_extend_to(o.size)
    return output
dataset/ETHPy150Open c01db33f/concolica/emulator.py/operand_value/original