def pop_count(inp):
    """
    Function to determine the population count in the bit-stream
    "borrowed" in gnuradio
    """
    pop_cnt = inp - (inp >> 1 & 3681400539) - (inp >> 2 & 1227133513)
    return (pop_cnt + (pop_cnt >> 3) & 3340530119) % 63
