






from collections.abc import Generator
from math import sin

def    SCREAMING_SNAKE_CASE_							(							__magic_name__					:  bytes					)		->			bytes:






	"""simple docstring"""



	if len(__magic_name__					) != 32:
		raise ValueError("""Input must be of length 32"""					)

	UpperCamelCase     :int          =	B""""""
	for i in [3, 2, 1, 0]:
		little_endian += string_aa[8 * i : 8 * i + 8]
	return little_endian

def    SCREAMING_SNAKE_CASE_							(							__magic_name__					:  int					)		->			bytes:






	"""simple docstring"""



	if i < 0:
		raise ValueError("""Input must be non-negative"""					)

	UpperCamelCase     :Any          =	format(__magic_name__	,			"""08x"""					)[-8:]
	UpperCamelCase     :Union[str, Any]          =	B""""""
	for i in [3, 2, 1, 0]:
		little_endian_hex += hex_rep[2 * i : 2 * i + 2].encode("""utf-8"""					)
	return little_endian_hex

def    SCREAMING_SNAKE_CASE_							(							__magic_name__					:  bytes					)		->			bytes:






	"""simple docstring"""



	UpperCamelCase     :str          =	B""""""
	for char in message:
		bit_string += format(__magic_name__	,			"""08b"""					).encode("""utf-8"""					)
	UpperCamelCase     :Any          =	format(len(__magic_name__					)	,			"""064b"""					).encode("""utf-8"""					)

	# Pad bit_string to a multiple of 512 chars
	bit_string += b"1"
	while len(__magic_name__					) % 512 != 448:
		bit_string += b"0"
	bit_string += to_little_endian(start_len[32:]					) + to_little_endian(start_len[:32]					)

	return bit_string

def    SCREAMING_SNAKE_CASE_							(							__magic_name__					:  bytes					)		->			Generator[list[int], None, None]:






	"""simple docstring"""



	if len(__magic_name__					) % 512 != 0:
		raise ValueError("""Input must have length that's a multiple of 512"""					)

	for pos in range(0	,			len(__magic_name__					)	,			512					):
		UpperCamelCase     :Tuple          =	bit_string[pos : pos + 512]
		UpperCamelCase     :Optional[int]          =	[]
		for i in range(0	,			512	,			32					):
			block_words.append(int(to_little_endian(block[i : i + 32]					)	,			2					)					)
		yield block_words

def    SCREAMING_SNAKE_CASE_							(							__magic_name__					:  int					)		->			int:






	"""simple docstring"""



	if i < 0:
		raise ValueError("""Input must be non-negative"""					)

	UpperCamelCase     :List[str]          =	format(__magic_name__	,			"""032b"""					)
	UpperCamelCase     :Any          =	""""""
	for c in i_str:
		new_str += "1" if c == "0" else "0"
	return int(__magic_name__	,			2					)

def    SCREAMING_SNAKE_CASE_							(							__magic_name__					:  int	,			__magic_name__					:  int					)		->			int:






	"""simple docstring"""



	return (a + b) % 2**32

def    SCREAMING_SNAKE_CASE_							(							__magic_name__					:  int	,			__magic_name__					:  int					)		->			int:






	"""simple docstring"""



	if i < 0:
		raise ValueError("""Input must be non-negative"""					)
	if shift < 0:
		raise ValueError("""Shift must be non-negative"""					)
	return ((i << shift) ^ (i >> (32 - shift))) % 2**32

def    SCREAMING_SNAKE_CASE_							(							__magic_name__					:  bytes					)		->			bytes:






	"""simple docstring"""



	UpperCamelCase     :Tuple          =	preprocess(__magic_name__					)

	UpperCamelCase     :List[str]          =	[int(2**32 * abs(sin(i + 1					)					)					) for i in range(64					)]

	# Starting states
	UpperCamelCase     :Union[str, Any]          =	0X67_45_23_01
	UpperCamelCase     :Union[str, Any]          =	0XEF_CD_AB_89
	UpperCamelCase     :List[str]          =	0X98_BA_DC_FE
	UpperCamelCase     :int          =	0X10_32_54_76

	UpperCamelCase     :int          =	[
	    7,
	    12,
	    17,
	    22,
	    7,
	    12,
	    17,
	    22,
	    7,
	    12,
	    17,
	    22,
	    7,
	    12,
	    17,
	    22,
	    5,
	    9,
	    14,
	    20,
	    5,
	    9,
	    14,
	    20,
	    5,
	    9,
	    14,
	    20,
	    5,
	    9,
	    14,
	    20,
	    4,
	    11,
	    16,
	    23,
	    4,
	    11,
	    16,
	    23,
	    4,
	    11,
	    16,
	    23,
	    4,
	    11,
	    16,
	    23,
	    6,
	    10,
	    15,
	    21,
	    6,
	    10,
	    15,
	    21,
	    6,
	    10,
	    15,
	    21,
	    6,
	    10,
	    15,
	    21,
	]

	# Process bit string in chunks, each with 16 32-char words
	for block_words in get_block_words(__magic_name__					):
		UpperCamelCase     :Optional[Any]          =	aa
		UpperCamelCase     :Any          =	ba
		UpperCamelCase     :Tuple          =	ca
		UpperCamelCase     :List[str]          =	da

		# Hash current chunk
		for i in range(64					):
			if i <= 15:
				# f = (b & c) | (not_32(b) & d)     # Alternate definition for f
				UpperCamelCase     :int          =	d ^ (b & (c ^ d))
				UpperCamelCase     :Optional[int]          =	i
			elif i <= 31:
				# f = (d & b) | (not_32(d) & c)     # Alternate definition for f
				UpperCamelCase     :str          =	c ^ (d & (b ^ c))
				UpperCamelCase     :Union[str, Any]          =	(5 * i + 1) % 16
			elif i <= 47:
				UpperCamelCase     :str          =	b ^ c ^ d
				UpperCamelCase     :Optional[int]          =	(3 * i + 5) % 16
			else:
				UpperCamelCase     :List[str]          =	c ^ (b | not_aa(__magic_name__					))
				UpperCamelCase     :int          =	(7 * i) % 16
			UpperCamelCase     :Dict          =	(f + a + added_consts[i] + block_words[g]) % 2**32
			UpperCamelCase     :Tuple          =	d
			UpperCamelCase     :str          =	c
			UpperCamelCase     :Tuple          =	b
			UpperCamelCase     :Optional[Any]          =	sum_aa(__magic_name__	,			left_rotate_aa(__magic_name__	,			shift_amounts[i]					)					)

		# Add hashed chunk to running total
		UpperCamelCase     :List[str]          =	sum_aa(__magic_name__	,			__magic_name__					)
		UpperCamelCase     :str          =	sum_aa(__magic_name__	,			__magic_name__					)
		UpperCamelCase     :int          =	sum_aa(__magic_name__	,			__magic_name__					)
		UpperCamelCase     :Optional[Any]          =	sum_aa(__magic_name__	,			__magic_name__					)

	UpperCamelCase     :Optional[Any]          =	reformat_hex(__magic_name__					) + reformat_hex(__magic_name__					) + reformat_hex(__magic_name__					) + reformat_hex(__magic_name__					)
	return digest


if __name__ == "__main__":
	import doctest

	doctest.testmod()






from typing import TYPE_CHECKING

from ...utils import _LazyModule


UpperCamelCase__    			=			{"""tokenization_wav2vec2_phoneme""": ["""Wav2Vec2PhonemeCTCTokenizer"""]}


if TYPE_CHECKING:
					from .tokenization_wavaveca_phoneme import WavaVecaPhonemeCTCTokenizer
else:
					import sys

					UpperCamelCase__    			=			_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




