def swap_32b(val):
    """ Swap 32b val
    :param val: 32b value
    :return: swapped 32b """
    tmp = ((val << 8) & 0xFF00FF00) | ((val >> 8) & 0xFF00FF)
    tmp = (tmp << 16) | (tmp >> 16)
    return tmp & 0xFFFFFFFF