def METHOD_NAME(state0):
  state1 = (state0 * 0x41C64E6D + 0x3039) & 0xffffffff
  state2 = (state1 * 0x41C64E6D + 0x3039) & 0xffffffff
  state3 = (state2 * 0x41C64E6D + 0x3039) & 0xffffffff
  # Combine the three states into one
  return (((state1 << 14) & 0xC0000000) |
          ((state2 >>  1) & 0x3FFF8000) |
          ((state3 >> 16) & 0x00007FFF), state3)