Rearrange decoder.