def METHOD_NAME(addr, val):
  tbl = list(range(48))
  rngstate = (val & 0xff) ^ 0x1111
  # Performs some table swaps based on the code
  for i in range(80):
    p1, rngstate = next_tblidx(rngstate)
    p2, rngstate = next_tblidx(rngstate)
    tbl[p1], tbl[p2] = tbl[p2], tbl[p1]
  # Reinitialize the RNG now to a fixed value and draw a variable number
  rngstate = 0x4EFAD1C3
  for i in range((addr >> 24) & 15):
    # Yeah this is on purpose, the output wired to the state
    rngstate, _ = lfsr_advance(rngstate)
  seed2, rngstate = lfsr_advance(rngstate)
  seed3, rngstate = lfsr_advance(rngstate)
  # Do it again, super secure stuff :P
  rngstate = (val >> 8) ^ 0xF254
  for i in range(val >> 8):
    # Yeah this is on purpose, the output wired to the state
    rngstate, _ = lfsr_advance(rngstate)
  seed0, rngstate = lfsr_advance(rngstate)
  seed1, rngstate = lfsr_advance(rngstate)
  return (addr, tbl, [seed0, seed1, seed2, seed3])