The duff device comment should explain the background well enough, so I will try to explain this very case:
The switch checks the last 2 bits of c and jumps to the corresponding case-statement inside the while loop. The code shown in the case example is also executed. Control then reaches the end of the while loop, so it goes back to the beginning again to check if the condition is still true. If so, all statements within the loop are executed, and the loop repeats until the condition becomes false. The initial switch usually ensures that c will be a multiple of 4 when the while loop is run for the first time.
Edit: duff device on Wikipedia . Adding a link to make it more obvious what I meant with "duff device comment". Please consider continuing to comment on interjay if you confirm this answer.
midor source share