Yeah, definitely appears to be part of that function. That's modulo code for sure, too.
Found it, part of my ASCII.s stdlib. Came up with a change, which compiles to about 24 bytes, compared to about 55 bytes, but uses a loop. These print out the tenths, hundredths, and thousandths places of a decimal number; I think I'll keep the former code, since it is branchless, I/O aside, and since I might want to remove the thousandths place anyway (since Q16+8 numbers aren't quite that precise).
It is too late. Off to some sleep 😕