That's pretty cool. It's been a while since I've done C, but couldn't you use a `for` loop instead of a while and perform any necessary cleanup in the "update" section? i.e. https://gcc.godbolt.org/z/jq84jondh
(The condition is optimized away by the big three: msvc, clang, and gcc)
(The condition is optimized away by the big three: msvc, clang, and gcc)