
def      __lowerCAmelCase						(							UpperCAmelCase__				:      int			,				UpperCAmelCase__				:      int       )  ->    int:
							while a != 0:
														lowerCamelCase_  ,   lowerCamelCase_							  =					b % a, a
							return b



def      __lowerCAmelCase						(							UpperCAmelCase__				:      int			,				UpperCAmelCase__				:      int       )  ->    int:
							if gcd(UpperCAmelCase__			,				UpperCAmelCase__       ) != 1:
														lowerCamelCase_							  =					F'''mod inverse of {a!r} and {m!r} does not exist'''
														raise ValueError(UpperCAmelCase__       )
							lowerCamelCase_  ,   lowerCamelCase_  ,   lowerCamelCase_							  =					1, 0, a
							lowerCamelCase_  ,   lowerCamelCase_  ,   lowerCamelCase_							  =					0, 1, m
							while va != 0:
														lowerCamelCase_							  =					ua // va
														lowerCamelCase_  ,   lowerCamelCase_  ,   lowerCamelCase_  ,   lowerCamelCase_  ,   lowerCamelCase_  ,   lowerCamelCase_							  =					(ua - q * va), (ua - q * va), (ua - q * va), va, va, va
							return ua % m







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_flax_available, is_torch_available


lowercase        =  {'''configuration_speech_encoder_decoder''': ['''SpeechEncoderDecoderConfig''']}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowercase        =  ['''SpeechEncoderDecoderModel''']

try:
		if not is_flax_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		lowercase        =  ['''FlaxSpeechEncoderDecoderModel''']

if TYPE_CHECKING:
		from .configuration_speech_encoder_decoder import SpeechEncoderDecoderConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_speech_encoder_decoder import SpeechEncoderDecoderModel

		try:
				if not is_flax_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_flax_speech_encoder_decoder import FlaxSpeechEncoderDecoderModel

else:
		import sys

		lowercase        =  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





