the arguments are 64 bit integers so this selects the top byte and fills the rest with zeros (due to unsigned)
it works on 32 bit assuming the compiler supports emulating 64 bit integers (which numpy requires in several places already)
even with emulation on i386 its still faster than the old code. One could add a 32 bit variant of the code to make that arch faster too, but I think its not worth the extra testing this requires.

shift and add is slower on x86, I don't think its worth special casing for other arches.