My method was to read two bits and then check a lookup table to see whether the resulting value is valid, if so the value read from the table contains the coefficient/run of zeros, or if not, read another bit and check the lookup table again, etc.
I found that I can replace this:
; mov...