def _decode(b):
    # decode arbitrary utf8 codepoints, tolerating surrogate pairs, nonstandard encodings, etc.
    for x in b:
        if x < 128:
            yield x
        else:
            # figure out how many bytes
            extra = 0
            for i in range(6, 0, -1):
                if x & (1<<i):
                    extra += 1
                else:
                    break

            bits = x % (1 << extra-6)
            for _ in range(extra):
                bits = (bits << 6) ^ (next(b) & 63)
            yield bits
dataset/ETHPy150Open ajinabraham/Mobile-Security-Framework-MobSF/StaticAnalyzer/tools/enjarify/enjarify/mutf8.py/_decode/swapped operands of `-`