def METHOD_NAME(ciphertext, size, key):
    if size == 0:
        return
    v4 = 0
    decoded_chars = bytearray(size)
    while v4 < size:
        if v4 % 4 == 0:
            key = (key + (key >> 4)) & UINT_MAX
        elif v4 % 4 == 1:
            v6 = (2 * key) & UINT_MAX
            key = (key - v6) & UINT_MAX
        elif v4 % 4 == 2:
            v6 = (key >> 2) & UINT_MAX
            key = (key - v6) & UINT_MAX
        else:
            key = (key * 9) & UINT_MAX
        decoded_chars[v4] = struct.unpack("B", ciphertext[v4 : v4 + 1])[0] ^ (key & 0xFF)
        v4 += 1
    return decoded_chars