Can someone please explain to me what this code does? I know some C, but I couldn't understand this.
BTW, the code looks relatively short because many semicolon-separated statements are crammed on a single line, and short variable names make that somewhat manageable and even visually symmetric. If you were to unfold it with each statement on its own line, I guess it would be at least 3 times the size.
This should be added to the README.