Be very general, obviously, you would need to see a lot more code to understand it completely. I am just not sure whats happening with the | and the << operators.
It's building a (potentially gigantic) index to use on the devices_seen array. It's building the index by shifting the elements of the data.auidata array (which I'm guessing are unsigned chars) and bitwise-oring them into an unsigned 64 bit value. An example of the same kind of thing:
modID starts at 0 and is then set equal to 0 (bitwise-ored) with the first element of data.auiData (casted as uint64_t) which is then shifted by 32. I think shifting it by 32 just means add 32 zeros to the value, right?
yes shifting zero has no effect. shifts multiply or divide by 2 per bit shifted, so 1 shifted twice is 4, or 4 shifted back the other way twice is 1 (divides by 2 2 times)