(self, args)
return wtf_expr
Count the leading zeroes
Count the leading zeroes
Count the leading zeroes
def _op_generic_Clz(self, args):
        """Count the leading zeroes"""
        piece_size = len(args[0])
        wtf_expr = claripy.BVV(piece_size, piece_size)
        for a in range(piece_size):
            bit = claripy.Extract(a, a, args[0])
            wtf_expr = claripy.If(bit==1, claripy.BVV(piece_size-a-1, piece_size), wtf_expr)
        return wtf_expr
def _op_generic_Clz ( self , args ) : piece_size = len ( args [ 0 ] ) wtf_expr = claripy . BVV ( piece_size , piece_size ) for a in range ( piece_size ) : bit = claripy . Extract ( a , a , args [ 0 ] ) wtf_expr = claripy . If ( bit == 1 , claripy . BVV ( piece_size - a - 1 , piece_size ) , wtf_expr ) return wtf_expr