Author here. I cannot use BSR, because have to execute code for all bits, regardless their value. The range is: the last bit to the first with value 1. It's a non-obvious iteration schema. :)
What I was suggesting was something like this (in pseudocode):
int previous_leftmost = 64;
while (mask != 0) {
leftmost = find_leftmost(mask);
mask ^= 1u << leftmost;
while (--previous_leftmost > leftmost)
func_false(previous_leftmost);
func_true(leftmost);
}