This is a port of portions of Random123, a library of counter-based pseudo-random number generators developed at D. E. Shaw Research and described in the publication linked below.
Although attempts were made to ensure output identical to the original C/C++ library, all errors and omissions are my own.