I'm from my phone now, I'm not able to scroll the code but as far I understood you are scanning for "aabbcc" in a block, once found you move to next one. Right? If yes, it's like the "?" checksum in minikey, basically you get one valid ripemd starting with "00" once every 256~ hashes. And it's interesting. it's like kangaroo 🦘 for hashes if I got it right.