'Halving subtract, for some ARM NEON instructions.'

@supports_vector
def _op_generic_HSub(self, args):

    components = []
    for (a, b) in self.vector_args(args):
        if self.is_signed:
            a = a.sign_extend(self._vector_size)
            b = b.sign_extend(self._vector_size)
        else:
            a = a.zero_extend(self._vector_size)
            b = b.zero_extend(self._vector_size)
        components.append((a - b)[self._vector_size:1])
    return claripy.Concat(*components)
