Doing both of those things does seem to help: https://godbolt.org/z/1vv7cK4bE
GCC trunk seems to like using `bool` so we may eventually be able to retire the hack of using `int`.