Tempering transforms an MT19937 state word with bitwise shifts, XOR, and masks before returning it. The transformation rearranges bits but remains reversible when its operations are understood. section 3.1.2
Reversing a tempering step
One step has the form y2 := y1 ^ (y1 << S) & B. Recovery proceeds in the opposite direction, repeatedly reconstructing dependent bits until the original word is recovered. Applying untemper to enough generated outputs recovers MT19937 state and enables an identical clone. section 3.1.2
