def extract_number(self):
        if (self.index == 0):
            self.generate_numbers();
            
        y = self.MT[self.index];        
        y = y ^ (y >> 11);
        y = y ^ ((y << 7) & 0x9d2c5680);
        y = y ^ ((y << 15) & 0xefc60000);
        y = y ^ (y >> 18);
        
        self.index = (self.index+1)%624
        return y;
            

#  // Generate an array of 624 untempered numbers
#  function generate_numbers() {
#      for i from 0 to 623 {
#          int y := (MT[i] & 0x80000000)                       // bit 31 (32nd bit) of MT[i]
#                         + (MT[(i+1) mod 624] & 0x7fffffff)   // bits 0-30 (first 31 bits) of MT[...]
#          MT[i] := MT[(i + 397) mod 624] xor (right shift by 1 bit(y))
#          if (y mod 2) != 0 { // y is odd
#              MT[i] := MT[i] xor (2567483615) // 0x9908b0df
#          }
#      }
#  }
dataset/ETHPy150Open reschly/cryptopals/prob21.py/MT19937.extract_number/original