protected open fun onCompleted ( value : T )

/**
 * This function is invoked once when the job was completed normally with the specified [value],
 * right before all the waiters for the coroutine's completion are notified.
 */


protected open fun onCancelled ( cause : Throwable , handled : Boolean )

/**
 * This function is invoked once when the job was cancelled with the specified [cause],
 * right before all the waiters for coroutine's completion are notified.
 *
 * **Note:** the state of the coroutine might not be final yet in this function and should not be queried.
 * You can use [completionCause] and [completionCauseHandled] to recover parameters that we passed
 * to this `onCancelled` invocation only when [isCompleted] returns `true`.
 *
 * @param cause The cancellation (failure) cause
 * @param handled `true` if the exception was handled by parent (always `true` when it is a [CancellationException])
 */


public final override fun resumeWith ( result : Result < T > )

{ <EOL> val state = makeCompletingOnce ( result . toState ( ) ) <EOL> if ( state === COMPLETING_WAITING_CHILDREN ) return <EOL> afterResume ( state ) <EOL> }

/**
 * Completes execution of this with coroutine with the specified result.
 */


public fun < R > start ( start : CoroutineStart , receiver : R , block : suspend R . ( ) -> T )

{ <EOL> start ( block , receiver , this ) <EOL> }

/**
 * Starts this coroutine with the given code [block] and [start] strategy.
 * This function shall be invoked at most once on this coroutine.
 *
 * - [DEFAULT] uses [startCoroutineCancellable].
 * - [ATOMIC] uses [startCoroutine].
 * - [UNDISPATCHED] uses [startCoroutineUndispatched].
 * - [LAZY] does nothing.
 */


private fun DefaultKotlinSourceSet . addDependencyForLegacyImport ( libraries : FileCollection )

{ <EOL> @ Suppress ( "<STR_LIT:DEPRECATION>" ) <EOL> val metadataConfigurationName = if ( project . isIntransitiveMetadataConfigurationEnabled ) { <EOL> intransitiveMetadataConfigurationName <EOL> } else { <EOL> implementationMetadataConfigurationName <EOL> } <EOL> project . dependencies . add ( metadataConfigurationName , libraries ) <EOL> }

/**
 * Legacy resolves [implementationMetadataConfigurationName] and [intransitiveMetadataConfigurationName]
 * to get dependencies for given source set. Therefore, compileDependencyFiles and dependencies in those configurations
 * must be synced.
 */


private fun qualifyInternalName ( declaration : IrDeclaration ) : String

{ <EOL> return getFqName ( declaration ) . asString ( ) + "<STR_LIT>" <EOL> }

/**
 * Produces the name to be used for non-exported LLVM declarations corresponding to [declaration].
 *
 * Note: since these declarations are going to be private, the name is only required not to clash with any
 * exported declarations.
 */


private fun Any . toHtmlLikeString ( ) : String

= toString ( ) <EOL> . replace ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> . replace ( "<STR_LIT:>>" , "<STR_LIT>" ) <EOL> . replace ( "<STR_LIT:<>" , "<STR_LIT>" )

/**
 * Sanitize string for rendering with HTML-like syntax.
 */


@ SinceKotlin ( "<STR_LIT:1.7>" ) <EOL> public fun IntProgression . first ( ) : Int

{ <EOL> if ( isEmpty ( ) ) <EOL> throw NoSuchElementException ( "<STR_LIT>" ) <EOL> return this . first <EOL> }

/**
 * Returns the first element.
 *
 * @throws NoSuchElementException if the progression is empty.
 */


@ SinceKotlin ( "<STR_LIT:1.7>" ) <EOL> public fun LongProgression . first ( ) : Long


@ SinceKotlin ( "<STR_LIT:1.7>" ) <EOL> public fun CharProgression . first ( ) : Char


@ SinceKotlin ( "<STR_LIT:1.7>" ) <EOL> public fun IntProgression . firstOrNull ( ) : Int ?

{ <EOL> return if ( isEmpty ( ) ) null else this . first <EOL> }

/**
 * Returns the first element, or `null` if the progression is empty.
 */


@ SinceKotlin ( "<STR_LIT:1.7>" ) <EOL> public fun LongProgression . firstOrNull ( ) : Long ?


@ SinceKotlin ( "<STR_LIT:1.7>" ) <EOL> public fun CharProgression . firstOrNull ( ) : Char ?


@ SinceKotlin ( "<STR_LIT:1.7>" ) <EOL> public fun IntProgression . last ( ) : Int

{ <EOL> if ( isEmpty ( ) ) <EOL> throw NoSuchElementException ( "<STR_LIT>" ) <EOL> return this . last <EOL> }

/**
 * Returns the last element.
 *
 * @throws NoSuchElementException if the progression is empty.
 *
 * @sample samples.collections.Collections.Elements.last
 */


@ SinceKotlin ( "<STR_LIT:1.7>" ) <EOL> public fun LongProgression . last ( ) : Long


@ SinceKotlin ( "<STR_LIT:1.7>" ) <EOL> public fun CharProgression . last ( ) : Char


@ SinceKotlin ( "<STR_LIT:1.7>" ) <EOL> public fun IntProgression . lastOrNull ( ) : Int ?

{ <EOL> return if ( isEmpty ( ) ) null else this . last <EOL> }

/**
 * Returns the last element, or `null` if the progression is empty.
 *
 * @sample samples.collections.Collections.Elements.last
 */


@ SinceKotlin ( "<STR_LIT:1.7>" ) <EOL> public fun LongProgression . lastOrNull ( ) : Long ?


@ SinceKotlin ( "<STR_LIT:1.7>" ) <EOL> public fun CharProgression . lastOrNull ( ) : Char ?


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun IntRange . random ( ) : Int

{ <EOL> return random ( Random ) <EOL> }

/**
 * Returns a random element from this range.
 *
 * @throws IllegalArgumentException if this range is empty.
 */


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun LongRange . random ( ) : Long


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun CharRange . random ( ) : Char


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> public fun IntRange . random ( random : Random ) : Int

{ <EOL> try { <EOL> return random . nextInt ( this ) <EOL> } catch ( e : IllegalArgumentException ) { <EOL> throw NoSuchElementException ( e . message ) <EOL> } <EOL> }

/**
 * Returns a random element from this range using the specified source of randomness.
 *
 * @throws IllegalArgumentException if this range is empty.
 */


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> public fun LongRange . random ( random : Random ) : Long

{ <EOL> try { <EOL> return random . nextLong ( this ) <EOL> } catch ( e : IllegalArgumentException ) { <EOL> throw NoSuchElementException ( e . message ) <EOL> } <EOL> }


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> public fun CharRange . random ( random : Random ) : Char

{ <EOL> try { <EOL> return random . nextInt ( first . code , last . code + <NUM_LIT:1> ) . toChar ( ) <EOL> } catch ( e : IllegalArgumentException ) { <EOL> throw NoSuchElementException ( e . message ) <EOL> } <EOL> }


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun IntRange . randomOrNull ( ) : Int ?

{ <EOL> return randomOrNull ( Random ) <EOL> }

/**
 * Returns a random element from this range, or `null` if this range is empty.
 */


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun LongRange . randomOrNull ( ) : Long ?


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun CharRange . randomOrNull ( ) : Char ?


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> public fun IntRange . randomOrNull ( random : Random ) : Int ?

{ <EOL> if ( isEmpty ( ) ) <EOL> return null <EOL> return random . nextInt ( this ) <EOL> }

/**
 * Returns a random element from this range using the specified source of randomness, or `null` if this range is empty.
 */


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> public fun LongRange . randomOrNull ( random : Random ) : Long ?

{ <EOL> if ( isEmpty ( ) ) <EOL> return null <EOL> return random . nextLong ( this ) <EOL> }


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> public fun CharRange . randomOrNull ( random : Random ) : Char ?

{ <EOL> if ( isEmpty ( ) ) <EOL> return null <EOL> return random . nextInt ( first . code , last . code + <NUM_LIT:1> ) . toChar ( ) <EOL> }


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ kotlin . internal . InlineOnly <EOL> public inline operator fun IntRange . contains ( element : Int ? ) : Boolean

{ <EOL> return element != null && contains ( element ) <EOL> }

/**
 * Returns `true` if this range contains the specified [element].
 *
 * Always returns `false` if the [element] is `null`.
 */


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ kotlin . internal . InlineOnly <EOL> public inline operator fun LongRange . contains ( element : Long ? ) : Boolean


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ kotlin . internal . InlineOnly <EOL> public inline operator fun CharRange . contains ( element : Char ? ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Int > . contains ( value : Byte ) : Boolean

{ <EOL> return contains ( value . toInt ( ) ) <EOL> }

/**
 * Checks if the specified [value] belongs to this range.
 */


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Long > . contains ( value : Byte ) : Boolean

{ <EOL> return contains ( value . toLong ( ) ) <EOL> }


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Short > . contains ( value : Byte ) : Boolean

{ <EOL> return contains ( value . toShort ( ) ) <EOL> }


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Double > . contains ( value : Byte ) : Boolean

{ <EOL> return contains ( value . toDouble ( ) ) <EOL> }


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Float > . contains ( value : Byte ) : Boolean

{ <EOL> return contains ( value . toFloat ( ) ) <EOL> }


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ SinceKotlin ( "<STR_LIT:1.9>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public operator fun OpenEndRange < Int > . contains ( value : Byte ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ SinceKotlin ( "<STR_LIT:1.9>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public operator fun OpenEndRange < Long > . contains ( value : Byte ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ SinceKotlin ( "<STR_LIT:1.9>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public operator fun OpenEndRange < Short > . contains ( value : Byte ) : Boolean


@ kotlin . internal . InlineOnly <EOL> public inline operator fun IntRange . contains ( value : Byte ) : Boolean

{ <EOL> return ( this as ClosedRange < Int > ) . contains ( value ) <EOL> }


@ kotlin . internal . InlineOnly <EOL> public inline operator fun LongRange . contains ( value : Byte ) : Boolean

{ <EOL> return ( this as ClosedRange < Long > ) . contains ( value ) <EOL> }


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Int > . contains ( value : Double ) : Boolean

{ <EOL> return value . toIntExactOrNull ( ) . let { if ( it != null ) contains ( it ) else false } <EOL> }


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Long > . contains ( value : Double ) : Boolean

{ <EOL> return value . toLongExactOrNull ( ) . let { if ( it != null ) contains ( it ) else false } <EOL> }


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Byte > . contains ( value : Double ) : Boolean

{ <EOL> return value . toByteExactOrNull ( ) . let { if ( it != null ) contains ( it ) else false } <EOL> }


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Short > . contains ( value : Double ) : Boolean

{ <EOL> return value . toShortExactOrNull ( ) . let { if ( it != null ) contains ( it ) else false } <EOL> }


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Float > . contains ( value : Double ) : Boolean


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Int > . contains ( value : Float ) : Boolean


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Long > . contains ( value : Float ) : Boolean


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Byte > . contains ( value : Float ) : Boolean


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Short > . contains ( value : Float ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Double > . contains ( value : Float ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ SinceKotlin ( "<STR_LIT:1.9>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public operator fun OpenEndRange < Double > . contains ( value : Float ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Long > . contains ( value : Int ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Byte > . contains ( value : Int ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Short > . contains ( value : Int ) : Boolean


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Double > . contains ( value : Int ) : Boolean


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Float > . contains ( value : Int ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ SinceKotlin ( "<STR_LIT:1.9>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public operator fun OpenEndRange < Long > . contains ( value : Int ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ SinceKotlin ( "<STR_LIT:1.9>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public operator fun OpenEndRange < Byte > . contains ( value : Int ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ SinceKotlin ( "<STR_LIT:1.9>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public operator fun OpenEndRange < Short > . contains ( value : Int ) : Boolean


@ kotlin . internal . InlineOnly <EOL> public inline operator fun LongRange . contains ( value : Int ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Int > . contains ( value : Long ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Byte > . contains ( value : Long ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Short > . contains ( value : Long ) : Boolean


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Double > . contains ( value : Long ) : Boolean


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Float > . contains ( value : Long ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ SinceKotlin ( "<STR_LIT:1.9>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public operator fun OpenEndRange < Int > . contains ( value : Long ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ SinceKotlin ( "<STR_LIT:1.9>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public operator fun OpenEndRange < Byte > . contains ( value : Long ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ SinceKotlin ( "<STR_LIT:1.9>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public operator fun OpenEndRange < Short > . contains ( value : Long ) : Boolean


@ kotlin . internal . InlineOnly <EOL> public inline operator fun IntRange . contains ( value : Long ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Int > . contains ( value : Short ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Long > . contains ( value : Short ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Byte > . contains ( value : Short ) : Boolean


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Double > . contains ( value : Short ) : Boolean


@ Deprecated ( "<STR_LIT>" ) <EOL> @ DeprecatedSinceKotlin ( warningSince = "<STR_LIT:1.3>" , errorSince = "<STR_LIT:1.4>" , hiddenSince = "<STR_LIT:1.5>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> public operator fun ClosedRange < Float > . contains ( value : Short ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ SinceKotlin ( "<STR_LIT:1.9>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public operator fun OpenEndRange < Int > . contains ( value : Short ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ SinceKotlin ( "<STR_LIT:1.9>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public operator fun OpenEndRange < Long > . contains ( value : Short ) : Boolean


@ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ SinceKotlin ( "<STR_LIT:1.9>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public operator fun OpenEndRange < Byte > . contains ( value : Short ) : Boolean


@ kotlin . internal . InlineOnly <EOL> public inline operator fun IntRange . contains ( value : Short ) : Boolean


@ kotlin . internal . InlineOnly <EOL> public inline operator fun LongRange . contains ( value : Short ) : Boolean


public infix fun Int . downTo ( to : Byte ) : IntProgression

{ <EOL> return IntProgression . fromClosedRange ( this , to . toInt ( ) , - <NUM_LIT:1> ) <EOL> }

/**
 * Returns a progression from this value down to the specified [to] value with the step -1.
 *
 * The [to] value should be less than or equal to `this` value.
 * If the [to] value is greater than `this` value the returned progression is empty.
 */


public infix fun Long . downTo ( to : Byte ) : LongProgression

{ <EOL> return LongProgression . fromClosedRange ( this , to . toLong ( ) , - <NUM_LIT:1L> ) <EOL> }


public infix fun Byte . downTo ( to : Byte ) : IntProgression

{ <EOL> return IntProgression . fromClosedRange ( this . toInt ( ) , to . toInt ( ) , - <NUM_LIT:1> ) <EOL> }


public infix fun Short . downTo ( to : Byte ) : IntProgression


public infix fun Char . downTo ( to : Char ) : CharProgression

{ <EOL> return CharProgression . fromClosedRange ( this , to , - <NUM_LIT:1> ) <EOL> }


public infix fun Int . downTo ( to : Int ) : IntProgression

{ <EOL> return IntProgression . fromClosedRange ( this , to , - <NUM_LIT:1> ) <EOL> }


public infix fun Long . downTo ( to : Int ) : LongProgression


public infix fun Byte . downTo ( to : Int ) : IntProgression

{ <EOL> return IntProgression . fromClosedRange ( this . toInt ( ) , to , - <NUM_LIT:1> ) <EOL> }


public infix fun Short . downTo ( to : Int ) : IntProgression


public infix fun Int . downTo ( to : Long ) : LongProgression

{ <EOL> return LongProgression . fromClosedRange ( this . toLong ( ) , to , - <NUM_LIT:1L> ) <EOL> }


public infix fun Long . downTo ( to : Long ) : LongProgression

{ <EOL> return LongProgression . fromClosedRange ( this , to , - <NUM_LIT:1L> ) <EOL> }


public infix fun Byte . downTo ( to : Long ) : LongProgression


public infix fun Short . downTo ( to : Long ) : LongProgression


public infix fun Int . downTo ( to : Short ) : IntProgression


public infix fun Long . downTo ( to : Short ) : LongProgression


public infix fun Byte . downTo ( to : Short ) : IntProgression


public infix fun Short . downTo ( to : Short ) : IntProgression


public fun IntProgression . reversed ( ) : IntProgression

{ <EOL> return IntProgression . fromClosedRange ( last , first , - step ) <EOL> }

/**
 * Returns a progression that goes over the same range in the opposite direction with the same step.
 */


public fun LongProgression . reversed ( ) : LongProgression

{ <EOL> return LongProgression . fromClosedRange ( last , first , - step ) <EOL> }


public fun CharProgression . reversed ( ) : CharProgression

{ <EOL> return CharProgression . fromClosedRange ( last , first , - step ) <EOL> }


public infix fun IntProgression . step ( step : Int ) : IntProgression

{ <EOL> checkStepIsPositive ( step > <NUM_LIT:0> , step ) <EOL> return IntProgression . fromClosedRange ( first , last , if ( this . step > <NUM_LIT:0> ) step else - step ) <EOL> }

/**
 * Returns a progression that goes over the same range with the given step.
 *
 * @sample samples.ranges.Ranges.stepInt
 */


public infix fun LongProgression . step ( step : Long ) : LongProgression

{ <EOL> checkStepIsPositive ( step > <NUM_LIT:0> , step ) <EOL> return LongProgression . fromClosedRange ( first , last , if ( this . step > <NUM_LIT:0> ) step else - step ) <EOL> }

/**
 * Returns a progression that goes over the same range with the given step.
 *
 * @sample samples.ranges.Ranges.stepLong
 */


public infix fun CharProgression . step ( step : Int ) : CharProgression

{ <EOL> checkStepIsPositive ( step > <NUM_LIT:0> , step ) <EOL> return CharProgression . fromClosedRange ( first , last , if ( this . step > <NUM_LIT:0> ) step else - step ) <EOL> }

/**
 * Returns a progression that goes over the same range with the given step.
 *
 * @sample samples.ranges.Ranges.stepChar
 */


public infix fun Int . until ( to : Byte ) : IntRange

{ <EOL> return this .. ( to . toInt ( ) - <NUM_LIT:1> ) . toInt ( ) <EOL> }

/**
 * Returns a range from this value up to but excluding the specified [to] value.
 *
 * If the [to] value is less than or equal to `this` value, then the returned range is empty.
 */


public infix fun Long . until ( to : Byte ) : LongRange

{ <EOL> return this .. ( to . toLong ( ) - <NUM_LIT:1> ) . toLong ( ) <EOL> }


public infix fun Byte . until ( to : Byte ) : IntRange

{ <EOL> return this . toInt ( ) .. ( to . toInt ( ) - <NUM_LIT:1> ) . toInt ( ) <EOL> }


public infix fun Short . until ( to : Byte ) : IntRange


public infix fun Char . until ( to : Char ) : CharRange

{ <EOL> if ( to <= '<CHAR_LIT>' ) return CharRange . EMPTY <EOL> return this .. ( to - <NUM_LIT:1> ) . toChar ( ) <EOL> }


public infix fun Int . until ( to : Int ) : IntRange

{ <EOL> if ( to <= Int . MIN_VALUE ) return IntRange . EMPTY <EOL> return this .. ( to - <NUM_LIT:1> ) . toInt ( ) <EOL> }


public infix fun Long . until ( to : Int ) : LongRange


public infix fun Byte . until ( to : Int ) : IntRange

{ <EOL> if ( to <= Int . MIN_VALUE ) return IntRange . EMPTY <EOL> return this . toInt ( ) .. ( to - <NUM_LIT:1> ) . toInt ( ) <EOL> }


public infix fun Short . until ( to : Int ) : IntRange


public infix fun Int . until ( to : Long ) : LongRange

{ <EOL> if ( to <= Long . MIN_VALUE ) return LongRange . EMPTY <EOL> return this . toLong ( ) .. ( to - <NUM_LIT:1> ) . toLong ( ) <EOL> }


public infix fun Long . until ( to : Long ) : LongRange

{ <EOL> if ( to <= Long . MIN_VALUE ) return LongRange . EMPTY <EOL> return this .. ( to - <NUM_LIT:1> ) . toLong ( ) <EOL> }


public infix fun Byte . until ( to : Long ) : LongRange


public infix fun Short . until ( to : Long ) : LongRange


public infix fun Int . until ( to : Short ) : IntRange


public infix fun Long . until ( to : Short ) : LongRange


public infix fun Byte . until ( to : Short ) : IntRange


public infix fun Short . until ( to : Short ) : IntRange


public fun < T : Comparable < T > > T . coerceAtLeast ( minimumValue : T ) : T

{ <EOL> return if ( this < minimumValue ) minimumValue else this <EOL> }

/**
 * Ensures that this value is not less than the specified [minimumValue].
 *
 * @return this value if it's greater than or equal to the [minimumValue] or the [minimumValue] otherwise.
 *
 * @sample samples.comparisons.ComparableOps.coerceAtLeastComparable
 */


public fun Byte . coerceAtLeast ( minimumValue : Byte ) : Byte

/**
 * Ensures that this value is not less than the specified [minimumValue].
 *
 * @return this value if it's greater than or equal to the [minimumValue] or the [minimumValue] otherwise.
 *
 * @sample samples.comparisons.ComparableOps.coerceAtLeast
 */


public fun Short . coerceAtLeast ( minimumValue : Short ) : Short


public fun Int . coerceAtLeast ( minimumValue : Int ) : Int


public fun Long . coerceAtLeast ( minimumValue : Long ) : Long


public fun Float . coerceAtLeast ( minimumValue : Float ) : Float


public fun Double . coerceAtLeast ( minimumValue : Double ) : Double


public fun < T : Comparable < T > > T . coerceAtMost ( maximumValue : T ) : T

{ <EOL> return if ( this > maximumValue ) maximumValue else this <EOL> }

/**
 * Ensures that this value is not greater than the specified [maximumValue].
 *
 * @return this value if it's less than or equal to the [maximumValue] or the [maximumValue] otherwise.
 *
 * @sample samples.comparisons.ComparableOps.coerceAtMostComparable
 */


public fun Byte . coerceAtMost ( maximumValue : Byte ) : Byte

/**
 * Ensures that this value is not greater than the specified [maximumValue].
 *
 * @return this value if it's less than or equal to the [maximumValue] or the [maximumValue] otherwise.
 *
 * @sample samples.comparisons.ComparableOps.coerceAtMost
 */


public fun Short . coerceAtMost ( maximumValue : Short ) : Short


public fun Int . coerceAtMost ( maximumValue : Int ) : Int


public fun Long . coerceAtMost ( maximumValue : Long ) : Long


public fun Float . coerceAtMost ( maximumValue : Float ) : Float


public fun Double . coerceAtMost ( maximumValue : Double ) : Double


public fun < T : Comparable < T > > T . coerceIn ( minimumValue : T ? , maximumValue : T ? ) : T

{ <EOL> if ( minimumValue !== null && maximumValue !== null ) { <EOL> if ( minimumValue > maximumValue ) throw IllegalArgumentException ( "<STR_LIT>" ) <EOL> if ( this < minimumValue ) return minimumValue <EOL> if ( this > maximumValue ) return maximumValue <EOL> } <EOL> else { <EOL> if ( minimumValue !== null && this < minimumValue ) return minimumValue <EOL> if ( maximumValue !== null && this > maximumValue ) return maximumValue <EOL> } <EOL> return this <EOL> }

/**
 * Ensures that this value lies in the specified range [minimumValue]..[maximumValue].
 *
 * @return this value if it's in the range, or [minimumValue] if this value is less than [minimumValue], or [maximumValue] if this value is greater than [maximumValue].
 *
 * @sample samples.comparisons.ComparableOps.coerceInComparable
 */


public fun Byte . coerceIn ( minimumValue : Byte , maximumValue : Byte ) : Byte

{ <EOL> if ( minimumValue > maximumValue ) throw IllegalArgumentException ( "<STR_LIT>" ) <EOL> if ( this < minimumValue ) return minimumValue <EOL> if ( this > maximumValue ) return maximumValue <EOL> return this <EOL> }

/**
 * Ensures that this value lies in the specified range [minimumValue]..[maximumValue].
 *
 * @return this value if it's in the range, or [minimumValue] if this value is less than [minimumValue], or [maximumValue] if this value is greater than [maximumValue].
 *
 * @sample samples.comparisons.ComparableOps.coerceIn
 */


public fun Short . coerceIn ( minimumValue : Short , maximumValue : Short ) : Short


public fun Int . coerceIn ( minimumValue : Int , maximumValue : Int ) : Int


public fun Long . coerceIn ( minimumValue : Long , maximumValue : Long ) : Long


public fun Float . coerceIn ( minimumValue : Float , maximumValue : Float ) : Float


public fun Double . coerceIn ( minimumValue : Double , maximumValue : Double ) : Double


@ SinceKotlin ( "<STR_LIT:1.1>" ) <EOL> public fun < T : Comparable < T > > T . coerceIn ( range : ClosedFloatingPointRange < T > ) : T

{ <EOL> if ( range . isEmpty ( ) ) throw IllegalArgumentException ( "<STR_LIT>" ) <EOL> return when { <EOL> range . lessThanOrEquals ( this , range . start ) && ! range . lessThanOrEquals ( range . start , this ) -> range . start <EOL> range . lessThanOrEquals ( range . endInclusive , this ) && ! range . lessThanOrEquals ( this , range . endInclusive ) -> range . endInclusive <EOL> else -> this <EOL> } <EOL> }

/**
 * Ensures that this value lies in the specified [range].
 *
 * @return this value if it's in the [range], or `range.start` if this value is less than `range.start`, or `range.endInclusive` if this value is greater than `range.endInclusive`.
 *
 * @sample samples.comparisons.ComparableOps.coerceInFloatingPointRange
 */


public fun < T : Comparable < T > > T . coerceIn ( range : ClosedRange < T > ) : T

{ <EOL> if ( range is ClosedFloatingPointRange ) { <EOL> return this . coerceIn < T > ( range ) <EOL> } <EOL> if ( range . isEmpty ( ) ) throw IllegalArgumentException ( "<STR_LIT>" ) <EOL> return when { <EOL> this < range . start -> range . start <EOL> this > range . endInclusive -> range . endInclusive <EOL> else -> this <EOL> } <EOL> }

/**
 * Ensures that this value lies in the specified [range].
 *
 * @return this value if it's in the [range], or `range.start` if this value is less than `range.start`, or `range.endInclusive` if this value is greater than `range.endInclusive`.
 *
 * @sample samples.comparisons.ComparableOps.coerceInComparable
 */


public fun Int . coerceIn ( range : ClosedRange < Int > ) : Int

{ <EOL> if ( range is ClosedFloatingPointRange ) { <EOL> return this . coerceIn < Int > ( range ) <EOL> } <EOL> if ( range . isEmpty ( ) ) throw IllegalArgumentException ( "<STR_LIT>" ) <EOL> return when { <EOL> this < range . start -> range . start <EOL> this > range . endInclusive -> range . endInclusive <EOL> else -> this <EOL> } <EOL> }

/**
 * Ensures that this value lies in the specified [range].
 *
 * @return this value if it's in the [range], or `range.start` if this value is less than `range.start`, or `range.endInclusive` if this value is greater than `range.endInclusive`.
 *
 * @sample samples.comparisons.ComparableOps.coerceIn
 */


public fun Long . coerceIn ( range : ClosedRange < Long > ) : Long

{ <EOL> if ( range is ClosedFloatingPointRange ) { <EOL> return this . coerceIn < Long > ( range ) <EOL> } <EOL> if ( range . isEmpty ( ) ) throw IllegalArgumentException ( "<STR_LIT>" ) <EOL> return when { <EOL> this < range . start -> range . start <EOL> this > range . endInclusive -> range . endInclusive <EOL> else -> this <EOL> } <EOL> }


@ ExperimentalSerializationApi <EOL> public fun < T > decodeFromConfig ( deserializer : DeserializationStrategy < T > , config : Config ) : T

= <EOL> ConfigReader ( config ) . decodeSerializableValue ( deserializer )

/**
 * Decodes the given [config] into a value of type [T] using the given serializer.
 */


@ ExperimentalSerializationApi <EOL> public fun < T > encodeToConfig ( serializer : SerializationStrategy < T > , value : T ) : Config

{ <EOL> lateinit var configValue : ConfigValue <EOL> val encoder = HoconConfigEncoder ( this ) { configValue = it } <EOL> encoder . encodeSerializableValue ( serializer , value ) <EOL> if ( configValue !is ConfigObject ) { <EOL> throw SerializationException ( "<STR_LIT>" + "<STR_LIT>" ) <EOL> } <EOL> return ( configValue as ConfigObject ) . toConfig ( ) <EOL> }

/**
 * Encodes the given [value] into a [Config] using the given [serializer].
 * @throws SerializationException If list or primitive type passed as a [value].
 */


@ ExperimentalSerializationApi <EOL> public inline fun < reified T > Hocon . decodeFromConfig ( config : Config ) : T

= <EOL> decodeFromConfig ( serializersModule . serializer ( ) , config )

/**
 * Decodes the given [config] into a value of type [T] using a deserializer retrieved
 * from the reified type parameter.
 */


@ ExperimentalSerializationApi <EOL> public inline fun < reified T > Hocon . encodeToConfig ( value : T ) : Config

= <EOL> encodeToConfig ( serializersModule . serializer ( ) , value )

/**
 * Encodes the given [value] of type [T] into a [Config] using a serializer retrieved
 * from the reified type parameter.
 */


@ ExperimentalSerializationApi <EOL> public fun Hocon ( from : Hocon = Hocon , builderAction : HoconBuilder . ( ) -> Unit ) : Hocon

{ <EOL> return HoconImpl ( HoconBuilder ( from ) . apply ( builderAction ) ) <EOL> }

/**
 * Creates an instance of [Hocon] configured from the optionally given [Hocon instance][from]
 * and adjusted with [builderAction].
 */


public open fun isDispatchNeeded ( context : CoroutineContext ) : Boolean

= true

/**
 * Returns `true` if the execution of the coroutine should be performed with [dispatch] method.
 * The default behavior for most dispatchers is to return `true`.
 *
 * If this method returns `false`, the coroutine is resumed immediately in the current thread,
 * potentially forming an event-loop to prevent stack overflows.
 * The event loop is an advanced topic and its implications can be found in [Dispatchers.Unconfined] documentation.
 *
 * The [context] parameter represents the context of the coroutine that is being dispatched,
 * or [EmptyCoroutineContext] if a non-coroutine-specific [Runnable] is dispatched instead.
 *
 * A dispatcher can override this method to provide a performance optimization and avoid paying a cost of an unnecessary dispatch.
 * E.g. [MainCoroutineDispatcher.immediate] checks whether we are already in the required UI thread in this method and avoids
 * an additional dispatch when it is not required.
 *
 * While this approach can be more efficient, it is not chosen by default to provide a consistent dispatching behaviour
 * so that users won't observe unexpected and non-consistent order of events by default.
 *
 * Coroutine builders like [launch][CoroutineScope.launch] and [async][CoroutineScope.async] accept an optional [CoroutineStart]
 * parameter that allows one to optionally choose the [undispatched][CoroutineStart.UNDISPATCHED] behavior to start coroutine immediately,
 * but to be resumed only in the provided dispatcher.
 *
 * This method should generally be exception-safe. An exception thrown from this method
 * may leave the coroutines that use this dispatcher in the inconsistent and hard to debug state.
 *
 * @see dispatch
 * @see Dispatchers.Unconfined
 */


@ ExperimentalCoroutinesApi <EOL> public open fun limitedParallelism ( parallelism : Int ) : CoroutineDispatcher

{ <EOL> parallelism . checkParallelism ( ) <EOL> return LimitedDispatcher ( this , parallelism ) <EOL> }

/**
 * Creates a view of the current dispatcher that limits the parallelism to the given [value][parallelism].
 * The resulting view uses the original dispatcher for execution, but with the guarantee that
 * no more than [parallelism] coroutines are executed at the same time.
 *
 * This method does not impose restrictions on the number of views or the total sum of parallelism values,
 * each view controls its own parallelism independently with the guarantee that the effective parallelism
 * of all views cannot exceed the actual parallelism of the original dispatcher.
 *
 * ### Limitations
 *
 * The default implementation of `limitedParallelism` does not support direct dispatchers,
 * such as executing the given runnable in place during [dispatch] calls.
 * Any dispatcher that may return `false` from [isDispatchNeeded] is considered direct.
 * For direct dispatchers, it is recommended to override this method
 * and provide a domain-specific implementation or to throw an [UnsupportedOperationException].
 *
 * ### Example of usage
 * ```
 * private val backgroundDispatcher = newFixedThreadPoolContext(4, "App Background")
 * // At most 2 threads will be processing images as it is really slow and CPU-intensive
 * private val imageProcessingDispatcher = backgroundDispatcher.limitedParallelism(2)
 * // At most 3 threads will be processing JSON to avoid image processing starvation
 * private val jsonProcessingDispatcher = backgroundDispatcher.limitedParallelism(3)
 * // At most 1 thread will be doing IO
 * private val fileWriterDispatcher = backgroundDispatcher.limitedParallelism(1)
 * ```
 * Note how in this example the application has an executor with 4 threads, but the total sum of all limits
 * is 6. Still, at most 4 coroutines can be executed simultaneously as each view limits only its own parallelism.
 *
 * Note that this example was structured in such a way that it illustrates the parallelism guarantees.
 * In practice, it is usually better to use [Dispatchers.IO] or [Dispatchers.Default] instead of creating a
 * `backgroundDispatcher`. It is both possible and advised to call `limitedParallelism` on them.
 */


public abstract fun dispatch ( context : CoroutineContext , block : Runnable )

/**
 * Requests execution of a runnable [block].
 * The dispatcher guarantees that [block] will eventually execute, typically by dispatching it to a thread pool,
 * using a dedicated thread, or just executing the block in place.
 * The [context] parameter represents the context of the coroutine that is being dispatched,
 * or [EmptyCoroutineContext] if a non-coroutine-specific [Runnable] is dispatched instead.
 * Implementations may use [context] for additional context-specific information,
 * such as priority, whether the dispatched coroutine can be invoked in place,
 * coroutine name, and additional diagnostic elements.
 *
 * This method should guarantee that the given [block] will be eventually invoked,
 * otherwise the system may reach a deadlock state and never leave it.
 * The cancellation mechanism is transparent for [CoroutineDispatcher] and is managed by [block] internals.
 *
 * This method should generally be exception-safe. An exception thrown from this method
 * may leave the coroutines that use this dispatcher in an inconsistent and hard-to-debug state.
 *
 * This method must not immediately call [block]. Doing so may result in `StackOverflowError`
 * when `dispatch` is invoked repeatedly, for example when [yield] is called in a loop.
 * In order to execute a block in place, it is required to return `false` from [isDispatchNeeded]
 * and delegate the `dispatch` implementation to `Dispatchers.Unconfined.dispatch` in such cases.
 * To support this, the coroutines machinery ensures in-place execution and forms an event-loop to
 * avoid unbound recursion.
 *
 * @see isDispatchNeeded
 * @see Dispatchers.Unconfined
 */


@ InternalCoroutinesApi <EOL> public open fun dispatchYield ( context : CoroutineContext , block : Runnable ) : Unit

= dispatch ( context , block )

/**
 * Dispatches execution of a runnable `block` onto another thread in the given `context`
 * with a hint for the dispatcher that the current dispatch is triggered by a [yield] call, so that the execution of this
 * continuation may be delayed in favor of already dispatched coroutines.
 *
 * Though the `yield` marker may be passed as a part of [context], this
 * is a separate method for performance reasons.
 *
 * @suppress **This an internal API and should not be used from general code.**
 */


public final override fun < T > interceptContinuation ( continuation : Continuation < T > ) : Continuation < T >

= <EOL> DispatchedContinuation ( this , continuation )

/**
 * Returns a continuation that wraps the provided [continuation], thus intercepting all resumptions.
 *
 * This method should generally be exception-safe. An exception thrown from this method
 * may leave the coroutines that use this dispatcher in the inconsistent and hard to debug state.
 */


@ Suppress ( "<STR_LIT>" ) <EOL> @ Deprecated ( message = "<STR_LIT>" + "<STR_LIT>" + "<STR_LIT>" , level = DeprecationLevel . ERROR ) <EOL> public operator fun plus ( other : CoroutineDispatcher ) : CoroutineDispatcher

= other

/**
 * @suppress **Error**: Operator '+' on two CoroutineDispatcher objects is meaningless.
 * CoroutineDispatcher is a coroutine context element and `+` is a set-sum operator for coroutine contexts.
 * The dispatcher to the right of `+` just replaces the dispatcher to the left.
 */


= "<STR_LIT>"


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> public expect inline fun < T > ( suspend ( ) -> T ) . startCoroutineUninterceptedOrReturn ( completion : Continuation < T > ) : Any ?

/**
 * Starts an unintercepted coroutine without a receiver and with result type [T] and executes it until its first suspension.
 * Returns the result of the coroutine or throws its exception if it does not suspend or [COROUTINE_SUSPENDED] if it suspends.
 * In the latter case, the [completion] continuation is invoked when the coroutine completes with a result or an exception.
 *
 * The coroutine is started directly in the invoker's thread without going through the [ContinuationInterceptor] that might
 * be present in the completion's [CoroutineContext]. It is the invoker's responsibility to ensure that a proper invocation
 * context is established.
 *
 * This function is designed to be used from inside of [suspendCoroutineUninterceptedOrReturn] to resume the execution of the suspended
 * coroutine using a reference to the suspending function.
 */


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> public expect inline fun < R , T > ( suspend R . ( ) -> T ) . startCoroutineUninterceptedOrReturn ( receiver : R , completion : Continuation < T > ) : Any ?

/**
 * Starts an unintercepted coroutine with receiver type [R] and result type [T] and executes it until its first suspension.
 * Returns the result of the coroutine or throws its exception if it does not suspend or [COROUTINE_SUSPENDED] if it suspends.
 * In the latter case, the [completion] continuation is invoked when the coroutine completes with a result or an exception.
 *
 * The coroutine is started directly in the invoker's thread without going through the [ContinuationInterceptor] that might
 * be present in the completion's [CoroutineContext]. It is the invoker's responsibility to ensure that a proper invocation
 * context is established.
 *
 * This function is designed to be used from inside of [suspendCoroutineUninterceptedOrReturn] to resume the execution of the suspended
 * coroutine using a reference to the suspending function.
 */


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> public expect fun < T > Continuation < T > . intercepted ( ) : Continuation < T >

/**
 * Intercepts this continuation with [ContinuationInterceptor].
 *
 * This function shall be used on the immediate result of [createCoroutineUnintercepted] or [suspendCoroutineUninterceptedOrReturn],
 * in which case it checks for [ContinuationInterceptor] in the continuation's [context][Continuation.context],
 * invokes [ContinuationInterceptor.interceptContinuation], caches and returns the result.
 *
 * If this function is invoked on other [Continuation] instances it returns `this` continuation unchanged.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun sin ( x : Double ) : Double

/** Computes the sine of the angle [x] given in radians.
 *
 * Special cases:
 * - `sin(NaN|+Inf|-Inf)` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun cos ( x : Double ) : Double

/** Computes the cosine of the angle [x] given in radians.
 *
 * Special cases:
 * - `cos(NaN|+Inf|-Inf)` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun tan ( x : Double ) : Double

/** Computes the tangent of the angle [x] given in radians.
 *
 * Special cases:
 * - `tan(NaN|+Inf|-Inf)` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun asin ( x : Double ) : Double

/**
 * Computes the arc sine of the value [x];
 * the returned value is an angle in the range from `-PI/2` to `PI/2` radians.
 *
 * Special cases:
 * - `asin(x)` is `NaN`, when `abs(x) > 1` or x is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun acos ( x : Double ) : Double

/**
 * Computes the arc cosine of the value [x];
 * the returned value is an angle in the range from `0.0` to `PI` radians.
 *
 * Special cases:
 * - `acos(x)` is `NaN`, when `abs(x) > 1` or x is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun atan ( x : Double ) : Double

/**
 * Computes the arc tangent of the value [x];
 * the returned value is an angle in the range from `-PI/2` to `PI/2` radians.
 *
 * Special cases:
 * - `atan(NaN)` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun atan2 ( y : Double , x : Double ) : Double

/**
 * Returns the angle `theta` of the polar coordinates `(r, theta)` that correspond
 * to the rectangular coordinates `(x, y)` by computing the arc tangent of the value [y] / [x];
 * the returned value is an angle in the range from `-PI` to `PI` radians.
 *
 * Special cases:
 * - `atan2(0.0, 0.0)` is `0.0`
 * - `atan2(0.0, x)` is `0.0` for `x > 0` and `PI` for `x < 0`
 * - `atan2(-0.0, x)` is `-0.0` for 'x > 0` and `-PI` for `x < 0`
 * - `atan2(y, +Inf)` is `0.0` for `0 < y < +Inf` and `-0.0` for '-Inf < y < 0`
 * - `atan2(y, -Inf)` is `PI` for `0 < y < +Inf` and `-PI` for `-Inf < y < 0`
 * - `atan2(y, 0.0)` is `PI/2` for `y > 0` and `-PI/2` for `y < 0`
 * - `atan2(+Inf, x)` is `PI/2` for finite `x`y
 * - `atan2(-Inf, x)` is `-PI/2` for finite `x`
 * - `atan2(NaN, x)` and `atan2(y, NaN)` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun sinh ( x : Double ) : Double

/**
 * Computes the hyperbolic sine of the value [x].
 *
 * Special cases:
 * - `sinh(NaN)` is `NaN`
 * - `sinh(+Inf)` is `+Inf`
 * - `sinh(-Inf)` is `-Inf`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun cosh ( x : Double ) : Double

/**
 * Computes the hyperbolic cosine of the value [x].
 *
 * Special cases:
 * - `cosh(NaN)` is `NaN`
 * - `cosh(+Inf|-Inf)` is `+Inf`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun tanh ( x : Double ) : Double

/**
 * Computes the hyperbolic tangent of the value [x].
 *
 * Special cases:
 * - `tanh(NaN)` is `NaN`
 * - `tanh(+Inf)` is `1.0`
 * - `tanh(-Inf)` is `-1.0`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun asinh ( x : Double ) : Double

/**
 * Computes the inverse hyperbolic sine of the value [x].
 *
 * The returned value is `y` such that `sinh(y) == x`.
 *
 * Special cases:
 * - `asinh(NaN)` is `NaN`
 * - `asinh(+Inf)` is `+Inf`
 * - `asinh(-Inf)` is `-Inf`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun acosh ( x : Double ) : Double

/**
 * Computes the inverse hyperbolic cosine of the value [x].
 *
 * The returned value is positive `y` such that `cosh(y) == x`.
 *
 * Special cases:
 * - `acosh(NaN)` is `NaN`
 * - `acosh(x)` is `NaN` when `x < 1`
 * - `acosh(+Inf)` is `+Inf`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun atanh ( x : Double ) : Double

/**
 * Computes the inverse hyperbolic tangent of the value [x].
 *
 * The returned value is `y` such that `tanh(y) == x`.
 *
 * Special cases:
 * - `tanh(NaN)` is `NaN`
 * - `tanh(x)` is `NaN` when `x > 1` or `x < -1`
 * - `tanh(1.0)` is `+Inf`
 * - `tanh(-1.0)` is `-Inf`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun hypot ( x : Double , y : Double ) : Double

/**
 * Computes `sqrt(x^2 + y^2)` without intermediate overflow or underflow.
 *
 * Special cases:
 * - returns `+Inf` if any of arguments is infinite
 * - returns `NaN` if any of arguments is `NaN` and the other is not infinite
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun sqrt ( x : Double ) : Double

/**
 * Computes the positive square root of the value [x].
 *
 * Special cases:
 * - `sqrt(x)` is `NaN` when `x < 0` or `x` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun exp ( x : Double ) : Double

/**
 * Computes Euler's number `e` raised to the power of the value [x].
 *
 * Special cases:
 * - `exp(NaN)` is `NaN`
 * - `exp(+Inf)` is `+Inf`
 * - `exp(-Inf)` is `0.0`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun expm1 ( x : Double ) : Double

/**
 * Computes `exp(x) - 1`.
 *
 * This function can be implemented to produce more precise result for [x] near zero.
 *
 * Special cases:
 * - `expm1(NaN)` is `NaN`
 * - `expm1(+Inf)` is `+Inf`
 * - `expm1(-Inf)` is `-1.0`
 *
 * @see [exp] function.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun log ( x : Double , base : Double ) : Double

/**
 * Computes the logarithm of the value [x] to the given [base].
 *
 * Special cases:
 * - `log(x, b)` is `NaN` if either `x` or `b` are `NaN`
 * - `log(x, b)` is `NaN` when `x < 0` or `b <= 0` or `b == 1.0`
 * - `log(+Inf, +Inf)` is `NaN`
 * - `log(+Inf, b)` is `+Inf` for `b > 1` and `-Inf` for `b < 1`
 * - `log(0.0, b)` is `-Inf` for `b > 1` and `+Inf` for `b > 1`
 *
 * See also logarithm functions for common fixed bases: [ln], [log10] and [log2].
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun ln ( x : Double ) : Double

/**
 * Computes the natural logarithm (base `E`) of the value [x].
 *
 * Special cases:
 * - `ln(NaN)` is `NaN`
 * - `ln(x)` is `NaN` when `x < 0.0`
 * - `ln(+Inf)` is `+Inf`
 * - `ln(0.0)` is `-Inf`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun log10 ( x : Double ) : Double

/**
 * Computes the common logarithm (base 10) of the value [x].
 *
 * @see [ln] function for special cases.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun log2 ( x : Double ) : Double

/**
 * Computes the binary logarithm (base 2) of the value [x].
 *
 * @see [ln] function for special cases.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun ln1p ( x : Double ) : Double

/**
 * Computes `ln(x + 1)`.
 *
 * This function can be implemented to produce more precise result for [x] near zero.
 *
 * Special cases:
 * - `ln1p(NaN)` is `NaN`
 * - `ln1p(x)` is `NaN` where `x < -1.0`
 * - `ln1p(-1.0)` is `-Inf`
 * - `ln1p(+Inf)` is `+Inf`
 *
 * @see [ln] function
 * @see [expm1] function
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun ceil ( x : Double ) : Double

/**
 * Rounds the given value [x] to an integer towards positive infinity.

 * @return the smallest double value that is greater than or equal to the given value [x] and is a mathematical integer.
 *
 * Special cases:
 * - `ceil(x)` is `x` where `x` is `NaN` or `+Inf` or `-Inf` or already a mathematical integer.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun floor ( x : Double ) : Double

/**
 * Rounds the given value [x] to an integer towards negative infinity.

 * @return the largest double value that is smaller than or equal to the given value [x] and is a mathematical integer.
 *
 * Special cases:
 * - `floor(x)` is `x` where `x` is `NaN` or `+Inf` or `-Inf` or already a mathematical integer.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun truncate ( x : Double ) : Double

/**
 * Rounds the given value [x] to an integer towards zero.
 *
 * @return the value [x] having its fractional part truncated.
 *
 * Special cases:
 * - `truncate(x)` is `x` where `x` is `NaN` or `+Inf` or `-Inf` or already a mathematical integer.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun round ( x : Double ) : Double

/**
 * Rounds the given value [x] towards the closest integer with ties rounded towards even integer.
 *
 * Special cases:
 * - `round(x)` is `x` where `x` is `NaN` or `+Inf` or `-Inf` or already a mathematical integer.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun abs ( x : Double ) : Double

/**
 * Returns the absolute value of the given value [x].
 *
 * Special cases:
 * - `abs(NaN)` is `NaN`
 *
 * @see absoluteValue extension property for [Double]
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun sign ( x : Double ) : Double

/**
 * Returns the sign of the given value [x]:
 * - `-1.0` if the value is negative,
 * - zero if the value is zero,
 * - `1.0` if the value is positive
 *
 * Special case:
 * - `sign(NaN)` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun min ( a : Double , b : Double ) : Double

/**
 * Returns the smaller of two values.
 *
 * If either value is `NaN`, then the result is `NaN`.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun max ( a : Double , b : Double ) : Double

/**
 * Returns the greater of two values.
 *
 * If either value is `NaN`, then the result is `NaN`.
 */


@ SinceKotlin ( "<STR_LIT:1.8>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public expect fun cbrt ( x : Double ) : Double

/**
 * Returns the cube root of [x]. For any `x`, `cbrt(-x) == -cbrt(x)`;
 * that is, the cube root of a negative value is the negative of the cube root
 * of that value's magnitude. Special cases:
 *
 * Special cases:
 * - If the argument is `NaN`, then the result is `NaN`.
 * - If the argument is infinite, then the result is an infinity with the same sign as the argument.
 * - If the argument is zero, then the result is a zero with the same sign as the argument.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Double . pow ( x : Double ) : Double

/**
 * Raises this value to the power [x].
 *
 * Special cases:
 * - `b.pow(0.0)` is `1.0`
 * - `b.pow(1.0) == b`
 * - `b.pow(NaN)` is `NaN`
 * - `NaN.pow(x)` is `NaN` for `x != 0.0`
 * - `b.pow(Inf)` is `NaN` for `abs(b) == 1.0`
 * - `b.pow(x)` is `NaN` for `b < 0` and `x` is finite and not an integer
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Double . pow ( n : Int ) : Double

/**
 * Raises this value to the integer power [n].
 *
 * See the other overload of [pow] for details.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Double . withSign ( sign : Double ) : Double

/**
 * Returns this value with the sign bit same as of the [sign] value.
 *
 * If [sign] is `NaN` the sign of the result is undefined.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Double . withSign ( sign : Int ) : Double

/**
 * Returns this value with the sign bit same as of the [sign] value.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Double . nextUp ( ) : Double

/**
 * Returns the [Double] value nearest to this value in direction of positive infinity.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Double . nextDown ( ) : Double

/**
 * Returns the [Double] value nearest to this value in direction of negative infinity.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Double . nextTowards ( to : Double ) : Double

/**
 * Returns the [Double] value nearest to this value in direction from this value towards the value [to].
 *
 * Special cases:
 * - `x.nextTowards(y)` is `NaN` if either `x` or `y` are `NaN`
 * - `x.nextTowards(x) == x`
 *
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Double . roundToInt ( ) : Int

/**
 * Rounds this [Double] value to the nearest integer and converts the result to [Int].
 * Ties are rounded towards positive infinity.
 *
 * Special cases:
 * - `x.roundToInt() == Int.MAX_VALUE` when `x > Int.MAX_VALUE`
 * - `x.roundToInt() == Int.MIN_VALUE` when `x < Int.MIN_VALUE`
 *
 * @throws IllegalArgumentException when this value is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Double . roundToLong ( ) : Long

/**
 * Rounds this [Double] value to the nearest integer and converts the result to [Long].
 * Ties are rounded towards positive infinity.
 *
 * Special cases:
 * - `x.roundToLong() == Long.MAX_VALUE` when `x > Long.MAX_VALUE`
 * - `x.roundToLong() == Long.MIN_VALUE` when `x < Long.MIN_VALUE`
 *
 * @throws IllegalArgumentException when this value is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun sin ( x : Float ) : Float

/** Computes the sine of the angle [x] given in radians.
 *
 * Special cases:
 * - `sin(NaN|+Inf|-Inf)` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun cos ( x : Float ) : Float

/** Computes the cosine of the angle [x] given in radians.
 *
 * Special cases:
 * - `cos(NaN|+Inf|-Inf)` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun tan ( x : Float ) : Float

/** Computes the tangent of the angle [x] given in radians.
 *
 * Special cases:
 * - `tan(NaN|+Inf|-Inf)` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun asin ( x : Float ) : Float

/**
 * Computes the arc sine of the value [x];
 * the returned value is an angle in the range from `-PI/2` to `PI/2` radians.
 *
 * Special cases:
 * - `asin(x)` is `NaN`, when `abs(x) > 1` or x is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun acos ( x : Float ) : Float

/**
 * Computes the arc cosine of the value [x];
 * the returned value is an angle in the range from `0.0` to `PI` radians.
 *
 * Special cases:
 * - `acos(x)` is `NaN`, when `abs(x) > 1` or x is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun atan ( x : Float ) : Float

/**
 * Computes the arc tangent of the value [x];
 * the returned value is an angle in the range from `-PI/2` to `PI/2` radians.
 *
 * Special cases:
 * - `atan(NaN)` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun atan2 ( y : Float , x : Float ) : Float

/**
 * Returns the angle `theta` of the polar coordinates `(r, theta)` that correspond
 * to the rectangular coordinates `(x, y)` by computing the arc tangent of the value [y] / [x];
 * the returned value is an angle in the range from `-PI` to `PI` radians.
 *
 * Special cases:
 * - `atan2(0.0, 0.0)` is `0.0`
 * - `atan2(0.0, x)` is `0.0` for `x > 0` and `PI` for `x < 0`
 * - `atan2(-0.0, x)` is `-0.0` for 'x > 0` and `-PI` for `x < 0`
 * - `atan2(y, +Inf)` is `0.0` for `0 < y < +Inf` and `-0.0` for '-Inf < y < 0`
 * - `atan2(y, -Inf)` is `PI` for `0 < y < +Inf` and `-PI` for `-Inf < y < 0`
 * - `atan2(y, 0.0)` is `PI/2` for `y > 0` and `-PI/2` for `y < 0`
 * - `atan2(+Inf, x)` is `PI/2` for finite `x`y
 * - `atan2(-Inf, x)` is `-PI/2` for finite `x`
 * - `atan2(NaN, x)` and `atan2(y, NaN)` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun sinh ( x : Float ) : Float

/**
 * Computes the hyperbolic sine of the value [x].
 *
 * Special cases:
 * - `sinh(NaN)` is `NaN`
 * - `sinh(+Inf)` is `+Inf`
 * - `sinh(-Inf)` is `-Inf`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun cosh ( x : Float ) : Float

/**
 * Computes the hyperbolic cosine of the value [x].
 *
 * Special cases:
 * - `cosh(NaN)` is `NaN`
 * - `cosh(+Inf|-Inf)` is `+Inf`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun tanh ( x : Float ) : Float

/**
 * Computes the hyperbolic tangent of the value [x].
 *
 * Special cases:
 * - `tanh(NaN)` is `NaN`
 * - `tanh(+Inf)` is `1.0`
 * - `tanh(-Inf)` is `-1.0`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun asinh ( x : Float ) : Float

/**
 * Computes the inverse hyperbolic sine of the value [x].
 *
 * The returned value is `y` such that `sinh(y) == x`.
 *
 * Special cases:
 * - `asinh(NaN)` is `NaN`
 * - `asinh(+Inf)` is `+Inf`
 * - `asinh(-Inf)` is `-Inf`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun acosh ( x : Float ) : Float

/**
 * Computes the inverse hyperbolic cosine of the value [x].
 *
 * The returned value is positive `y` such that `cosh(y) == x`.
 *
 * Special cases:
 * - `acosh(NaN)` is `NaN`
 * - `acosh(x)` is `NaN` when `x < 1`
 * - `acosh(+Inf)` is `+Inf`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun atanh ( x : Float ) : Float

/**
 * Computes the inverse hyperbolic tangent of the value [x].
 *
 * The returned value is `y` such that `tanh(y) == x`.
 *
 * Special cases:
 * - `tanh(NaN)` is `NaN`
 * - `tanh(x)` is `NaN` when `x > 1` or `x < -1`
 * - `tanh(1.0)` is `+Inf`
 * - `tanh(-1.0)` is `-Inf`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun hypot ( x : Float , y : Float ) : Float

/**
 * Computes `sqrt(x^2 + y^2)` without intermediate overflow or underflow.
 *
 * Special cases:
 * - returns `+Inf` if any of arguments is infinite
 * - returns `NaN` if any of arguments is `NaN` and the other is not infinite
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun sqrt ( x : Float ) : Float

/**
 * Computes the positive square root of the value [x].
 *
 * Special cases:
 * - `sqrt(x)` is `NaN` when `x < 0` or `x` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun exp ( x : Float ) : Float

/**
 * Computes Euler's number `e` raised to the power of the value [x].
 *
 * Special cases:
 * - `exp(NaN)` is `NaN`
 * - `exp(+Inf)` is `+Inf`
 * - `exp(-Inf)` is `0.0`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun expm1 ( x : Float ) : Float

/**
 * Computes `exp(x) - 1`.
 *
 * This function can be implemented to produce more precise result for [x] near zero.
 *
 * Special cases:
 * - `expm1(NaN)` is `NaN`
 * - `expm1(+Inf)` is `+Inf`
 * - `expm1(-Inf)` is `-1.0`
 *
 * @see [exp] function.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun log ( x : Float , base : Float ) : Float

/**
 * Computes the logarithm of the value [x] to the given [base].
 *
 * Special cases:
 * - `log(x, b)` is `NaN` if either `x` or `b` are `NaN`
 * - `log(x, b)` is `NaN` when `x < 0` or `b <= 0` or `b == 1.0`
 * - `log(+Inf, +Inf)` is `NaN`
 * - `log(+Inf, b)` is `+Inf` for `b > 1` and `-Inf` for `b < 1`
 * - `log(0.0, b)` is `-Inf` for `b > 1` and `+Inf` for `b > 1`
 *
 * See also logarithm functions for common fixed bases: [ln], [log10] and [log2].
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun ln ( x : Float ) : Float

/**
 * Computes the natural logarithm (base `E`) of the value [x].
 *
 * Special cases:
 * - `ln(NaN)` is `NaN`
 * - `ln(x)` is `NaN` when `x < 0.0`
 * - `ln(+Inf)` is `+Inf`
 * - `ln(0.0)` is `-Inf`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun log10 ( x : Float ) : Float

/**
 * Computes the common logarithm (base 10) of the value [x].
 *
 * @see [ln] function for special cases.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun log2 ( x : Float ) : Float

/**
 * Computes the binary logarithm (base 2) of the value [x].
 *
 * @see [ln] function for special cases.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun ln1p ( x : Float ) : Float

/**
 * Computes `ln(x + 1)`.
 *
 * This function can be implemented to produce more precise result for [x] near zero.
 *
 * Special cases:
 * - `ln1p(NaN)` is `NaN`
 * - `ln1p(x)` is `NaN` where `x < -1.0`
 * - `ln1p(-1.0)` is `-Inf`
 * - `ln1p(+Inf)` is `+Inf`
 *
 * @see [ln] function
 * @see [expm1] function
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun ceil ( x : Float ) : Float

/**
 * Rounds the given value [x] to an integer towards positive infinity.

 * @return the smallest Float value that is greater than or equal to the given value [x] and is a mathematical integer.
 *
 * Special cases:
 * - `ceil(x)` is `x` where `x` is `NaN` or `+Inf` or `-Inf` or already a mathematical integer.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun floor ( x : Float ) : Float

/**
 * Rounds the given value [x] to an integer towards negative infinity.

 * @return the largest Float value that is smaller than or equal to the given value [x] and is a mathematical integer.
 *
 * Special cases:
 * - `floor(x)` is `x` where `x` is `NaN` or `+Inf` or `-Inf` or already a mathematical integer.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun truncate ( x : Float ) : Float

/**
 * Rounds the given value [x] to an integer towards zero.
 *
 * @return the value [x] having its fractional part truncated.
 *
 * Special cases:
 * - `truncate(x)` is `x` where `x` is `NaN` or `+Inf` or `-Inf` or already a mathematical integer.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun round ( x : Float ) : Float

/**
 * Rounds the given value [x] towards the closest integer with ties rounded towards even integer.
 *
 * Special cases:
 * - `round(x)` is `x` where `x` is `NaN` or `+Inf` or `-Inf` or already a mathematical integer.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun abs ( x : Float ) : Float

/**
 * Returns the absolute value of the given value [x].
 *
 * Special cases:
 * - `abs(NaN)` is `NaN`
 *
 * @see absoluteValue extension property for [Float]
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun sign ( x : Float ) : Float

/**
 * Returns the sign of the given value [x]:
 * - `-1.0` if the value is negative,
 * - zero if the value is zero,
 * - `1.0` if the value is positive
 *
 * Special case:
 * - `sign(NaN)` is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun min ( a : Float , b : Float ) : Float

/**
 * Returns the smaller of two values.
 *
 * If either value is `NaN`, then the result is `NaN`.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun max ( a : Float , b : Float ) : Float

/**
 * Returns the greater of two values.
 *
 * If either value is `NaN`, then the result is `NaN`.
 */


@ SinceKotlin ( "<STR_LIT:1.8>" ) <EOL> @ WasExperimental ( ExperimentalStdlibApi :: class ) <EOL> public expect fun cbrt ( x : Float ) : Float

/**
 * Returns the cube root of [x]. For any `x`, `cbrt(-x) == -cbrt(x)`;
 * that is, the cube root of a negative value is the negative of the cube root
 * of that value's magnitude. Special cases:
 *
 * Special cases:
 * - If the argument is `NaN`, then the result is `NaN`.
 * - If the argument is infinite, then the result is an infinity with the same sign as the argument.
 * - If the argument is zero, then the result is a zero with the same sign as the argument.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Float . pow ( x : Float ) : Float

/**
 * Raises this value to the power [x].
 *
 * Special cases:
 * - `b.pow(0.0)` is `1.0`
 * - `b.pow(1.0) == b`
 * - `b.pow(NaN)` is `NaN`
 * - `NaN.pow(x)` is `NaN` for `x != 0.0`
 * - `b.pow(Inf)` is `NaN` for `abs(b) == 1.0`
 * - `b.pow(x)` is `NaN` for `b < 0` and `x` is finite and not an integer
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Float . pow ( n : Int ) : Float

/**
 * Raises this value to the integer power [n].
 *
 * See the other overload of [pow] for details.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Float . withSign ( sign : Float ) : Float

/**
 * Returns this value with the sign bit same as of the [sign] value.
 *
 * If [sign] is `NaN` the sign of the result is undefined.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Float . withSign ( sign : Int ) : Float

/**
 * Returns this value with the sign bit same as of the [sign] value.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Float . roundToInt ( ) : Int

/**
 * Rounds this [Float] value to the nearest integer and converts the result to [Int].
 * Ties are rounded towards positive infinity.
 *
 * Special cases:
 * - `x.roundToInt() == Int.MAX_VALUE` when `x > Int.MAX_VALUE`
 * - `x.roundToInt() == Int.MIN_VALUE` when `x < Int.MIN_VALUE`
 *
 * @throws IllegalArgumentException when this value is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun Float . roundToLong ( ) : Long

/**
 * Rounds this [Float] value to the nearest integer and converts the result to [Long].
 * Ties are rounded towards positive infinity.
 *
 * Special cases:
 * - `x.roundToLong() == Long.MAX_VALUE` when `x > Long.MAX_VALUE`
 * - `x.roundToLong() == Long.MIN_VALUE` when `x < Long.MIN_VALUE`
 *
 * @throws IllegalArgumentException when this value is `NaN`
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun abs ( n : Int ) : Int

/**
 * Returns the absolute value of the given value [n].
 *
 * Special cases:
 * - `abs(Int.MIN_VALUE)` is `Int.MIN_VALUE` due to an overflow
 *
 * @see absoluteValue extension property for [Int]
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun min ( a : Int , b : Int ) : Int

/**
 * Returns the smaller of two values.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun max ( a : Int , b : Int ) : Int

/**
 * Returns the greater of two values.
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun abs ( n : Long ) : Long

/**
 * Returns the absolute value of the given value [n].
 *
 * Special cases:
 * - `abs(Long.MIN_VALUE)` is `Long.MIN_VALUE` due to an overflow
 *
 * @see absoluteValue extension property for [Long]
 */


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun min ( a : Long , b : Long ) : Long


@ SinceKotlin ( "<STR_LIT:1.2>" ) <EOL> public expect fun max ( a : Long , b : Long ) : Long


override fun processSecondPass ( ) : AbstractSet

{ <EOL> if ( secondPassVisited ) { <EOL> if ( fSet . isBackReferenced ) { <EOL> @ OptIn ( ExperimentalNativeApi :: class ) <EOL> assert ( backReferencedSet != null ) <EOL> return backReferencedSet ! ! <EOL> } <EOL> } <EOL> secondPassVisited = true <EOL> return processSecondPassInternal ( ) <EOL> }

/**
 * This method is used for traversing nodes after the first stage of compilation.
 */


{ <EOL> _reusableCancellableContinuation . loop { <EOL> if ( it !== REUSABLE_CLAIMED ) return <EOL> } <EOL> }

/**
 * Awaits until previous call to `suspendCancellableCoroutineReusable` will
 * stop mutating cached instance
 */


internal fun tryReleaseClaimedContinuation ( continuation : CancellableContinuation < * > ) : Throwable ?

{ <EOL> _reusableCancellableContinuation . loop { state -> <EOL> when { <EOL> state === REUSABLE_CLAIMED -> { <EOL> if ( _reusableCancellableContinuation . compareAndSet ( REUSABLE_CLAIMED , continuation ) ) return null <EOL> } <EOL> state is Throwable -> { <EOL> require ( _reusableCancellableContinuation . compareAndSet ( state , null ) ) <EOL> return state <EOL> } <EOL> else -> error ( "<STR_LIT>" ) <EOL> } <EOL> } <EOL> }

/**
 * Checks whether there were any attempts to cancel reusable CC while it was in [REUSABLE_CLAIMED] state
 * and returns cancellation cause if so, `null` otherwise.
 * If continuation was cancelled, it becomes non-reusable.
 *
 * ```
 * suspendCancellableCoroutineReusable { // <- claimed
 * // Any asynchronous cancellation is "postponed" while this block
 * // is being executed
 * } // postponed cancellation is checked here in `getResult`
 * ```
 *
 * See [CancellableContinuationImpl.getResult].
 */


internal fun postponeCancellation ( cause : Throwable ) : Boolean

{ <EOL> _reusableCancellableContinuation . loop { state -> <EOL> when ( state ) { <EOL> REUSABLE_CLAIMED -> { <EOL> if ( _reusableCancellableContinuation . compareAndSet ( REUSABLE_CLAIMED , cause ) ) <EOL> return true <EOL> } <EOL> is Throwable -> return true <EOL> else -> { <EOL> if ( _reusableCancellableContinuation . compareAndSet ( state , null ) ) <EOL> return false <EOL> } <EOL> } <EOL> } <EOL> }

/**
 * Tries to postpone cancellation if reusable CC is currently in [REUSABLE_CLAIMED] state.
 * Returns `true` if cancellation is (or previously was) postponed, `false` otherwise.
 */


@ InternalCoroutinesApi <EOL> public fun < T > Continuation < T > . resumeCancellableWith ( result : Result < T > , onCancellation : ( ( cause : Throwable ) -> Unit ) ? = null ) : Unit

= when ( this ) { <EOL> is DispatchedContinuation -> resumeCancellableWith ( result , onCancellation ) <EOL> else -> resumeWith ( result ) <EOL> }

/**
 * It is not inline to save bytecode (it is pretty big and used in many places)
 * and we leave it public so that its name is not mangled in use stack traces if it shows there.
 * It may appear in stack traces when coroutines are started/resumed with unconfined dispatcher.
 * @suppress **This an internal API and should not be used from general code.**
 */


private inline fun DispatchedContinuation < * > . executeUnconfined ( contState : Any ? , mode : Int , doYield : Boolean = false , block : ( ) -> Unit ) : Boolean

{ <EOL> assert { mode != MODE_UNINITIALIZED } <EOL> val eventLoop = ThreadLocalEventLoop . eventLoop <EOL> if ( doYield && eventLoop . isUnconfinedQueueEmpty ) return false <EOL> return if ( eventLoop . isUnconfinedLoopActive ) { <EOL> _state = contState <EOL> resumeMode = mode <EOL> eventLoop . dispatchUnconfined ( this ) <EOL> true <EOL> } else { <EOL> runUnconfinedEventLoop ( eventLoop , block = block ) <EOL> false <EOL> } <EOL> }

/**
 * Executes given [block] as part of current event loop, updating current continuation
 * mode and state if continuation is not resumed immediately.
 * [doYield] indicates whether current continuation is yielding (to provide fast-path if event-loop is empty).
 * Returns `true` if execution of continuation was queued (trampolined) or `false` otherwise.
 */


private fun FirSimpleFunction . substituteOrNull ( substitutor : EnhancedForWarningConeSubstitutor , context : CheckerContext , ) : FirSimpleFunction ?

{ <EOL> symbol . lazyResolveToPhase ( FirResolvePhase . TYPES ) <EOL> var isEnhanced = false <EOL> val newParameterTypes = valueParameters . map { substitutor . substituteOrNull ( it . returnTypeRef . coneType ) ? . also { isEnhanced = true } } <EOL> val newContextReceiverTypes = contextReceivers . map { substitutor . substituteOrNull ( it . typeRef . coneType ) ? . also { isEnhanced = true } } <EOL> val newReturnType = substitutor . substituteOrNull ( context . returnTypeCalculator . tryCalculateReturnType ( this ) . coneType ) ? . also { isEnhanced = true } <EOL> val newExtensionReceiverType = <EOL> receiverParameter ? . typeRef ? . coneType ? . let { substitutor . substituteOrNull ( it ) } ? . also { isEnhanced = true } <EOL> return runIf ( isEnhanced ) { <EOL> FirFakeOverrideGenerator . createCopyForFirFunction ( FirFakeOverrideGenerator . createSymbolForSubstitutionOverride ( symbol ) , this , null , context . session , FirDeclarationOrigin . Enhancement , newDispatchReceiverType = null , newParameterTypes = newParameterTypes , newReturnType = newReturnType , newContextReceiverTypes = newContextReceiverTypes , newReceiverType = newExtensionReceiverType , ) <EOL> } <EOL> }

/**
 * @see org.jetbrains.kotlin.fir.scopes.impl.FirClassSubstitutionScope.createSubstitutionOverrideFunction
 * @see org.jetbrains.kotlin.fir.scopes.impl.FirClassSubstitutionScope.createSubstitutedData
 */


private fun FirProperty . substituteOrNull ( substitutor : EnhancedForWarningConeSubstitutor , context : CheckerContext , ) : FirProperty ?

{ <EOL> if ( ! isJavaOrEnhancement ) return null <EOL> symbol . lazyResolveToPhase ( FirResolvePhase . TYPES ) <EOL> var isEnhanced = false <EOL> val newContextReceiverTypes = contextReceivers . map { substitutor . substituteOrNull ( it . typeRef . coneType ) ? . also { isEnhanced = true } } <EOL> val newReturnType = substitutor . substituteOrNull ( context . returnTypeCalculator . tryCalculateReturnType ( this ) . coneType ) ? . also { isEnhanced = true } <EOL> val newExtensionReceiverType = <EOL> receiverParameter ? . typeRef ? . coneType ? . let { substitutor . substituteOrNull ( it ) } ? . also { isEnhanced = true } <EOL> return runIf ( isEnhanced ) { <EOL> FirFakeOverrideGenerator . createCopyForFirProperty ( FirFakeOverrideGenerator . createSymbolForSubstitutionOverride ( symbol ) , this , null , context . session , FirDeclarationOrigin . Enhancement , newDispatchReceiverType = null , newReturnType = newReturnType , newContextReceiverTypes = newContextReceiverTypes , newReceiverType = newExtensionReceiverType , ) <EOL> } <EOL> }

/**
 * @see org.jetbrains.kotlin.fir.scopes.impl.FirClassSubstitutionScope.createSubstitutionOverrideProperty
 * @see org.jetbrains.kotlin.fir.scopes.impl.FirClassSubstitutionScope.createSubstitutedData
 */


public abstract fun getFileName ( ) : String

/**
 * The name a Kotlin file which will be generated.
 *
 * Should have the `.kt` extension.
 *
 * It will be used as a Java facade name, e.g., for the file name `myFile.kt`, the `MyFileKt` facade is generated if the file contains some properties or functions.
 *
 * @see KtResolveExtensionFile
 */


public abstract fun getFilePackageName ( ) : FqName

/**
 * [FqName] of the package specified in the file
 *
 * The operation might be called regularly, so the [getFilePackageName] should work fast and avoid building the whole file text.
 *
 * It should be equal to the package name specified in the [buildFileText].
 *
 * @see KtResolveExtensionFile
 */


public abstract fun getTopLevelClassifierNames ( ) : Set < Name >

/**
 * Returns the set of top-level classifier (classes, interfaces, objects, and type-aliases) names in the file.
 *
 * The result may have false-positive entries but cannot have false-negative entries. It should contain all the names in the package but may have some additional names that are not there.
 *
 * @see KtResolveExtensionFile
 */


public abstract fun getTopLevelCallableNames ( ) : Set < Name >

/**
 * Returns the set of top-level callable (functions and properties) names in the file.
 *
 * The result may have false-positive entries but cannot have false-negative entries. It should contain all the names in the package but may have some additional names that are not there.
 *
 * @see KtResolveExtensionFile
 */


public abstract fun buildFileText ( ) : String

/**
 * Creates the generated Kotlin source file text.
 *
 * The resulted String should be a valid Kotlin code.
 * It should be consistent with other declarations which are present in the [KtResolveExtensionFile], more specifically:
 * 1. [getFilePackageName] should be equal to the file's package name.
 * 2. All classifier names should be contained in the [getTopLevelClassifierNames].
 * 3. All callable names should be contained in the [getTopLevelCallableNames].
 *
 * Additional restrictions on the file text:
 * 1. The File should not contain the `kotlin.jvm.JvmMultifileClass` and `kotlin.jvm.JvmName` annotations on the file level.
 * 2. All declaration types should be specified explicitly.
 *
 * @see KtResolveExtensionFile
 */


public abstract fun createNavigationTargetsProvider ( ) : KtResolveExtensionNavigationTargetsProvider

/**
 * Creates a [KtResolveExtensionNavigationTargetsProvider] for this [KtResolveExtensionFile].
 *
 * @see KtResolveExtensionNavigationTargetsProvider
 * @see KtResolveExtensionFile
 */


@ ExperimentalMultikApi <EOL> @ JvmName ( "<STR_LIT>" ) <EOL> public inline fun < reified T : Number > Multik . createAlignedNDArray ( data : List < List < T > > , filling : Double = <NUM_LIT:0.0> ) : D2Array < T >

{ <EOL> require ( data . isNotEmpty ( ) ) <EOL> val maxLength = data . maxOf { it . size } <EOL> val paddingIdx : T = filling . toPrimitiveType ( ) <EOL> return mk . d2array ( data . size , maxLength ) { idx -> <EOL> val sequenceIdx = idx / maxLength <EOL> val elementIdx = idx % maxLength <EOL> if ( elementIdx < data [ sequenceIdx ] . size ) <EOL> data [ sequenceIdx ] [ elementIdx ] <EOL> else <EOL> paddingIdx <EOL> } <EOL> }

/**
 * Creates [NDArray] of 2nd dims filled with values from [data].
 * Sequences in the batch can have a different number of elements the maximum length will be chosen for each dimension.
 * Smaller sequences will be filled with [filling] to the maximum length.
 */


@ ExperimentalMultikApi <EOL> @ JvmName ( "<STR_LIT>" ) <EOL> public inline fun < reified T : Number > Multik . createAlignedNDArray ( data : Array < Array < T > > , filling : Double = <NUM_LIT:0.0> ) : D2Array < T >

= this . createAlignedNDArray ( data . map { it . asList ( ) } , filling )


@ ExperimentalMultikApi <EOL> @ JvmName ( "<STR_LIT>" ) <EOL> public inline fun < reified T : Number > Multik . createAlignedNDArray ( data : List < List < List < T > > > , filling : Double = <NUM_LIT:0.0> ) : D3Array < T >

{ <EOL> require ( data . isNotEmpty ( ) ) <EOL> val maxLength2Dim = data . maxOf { it . size } <EOL> val maxLength3Dim = data . maxOf { seq -> seq . maxOf { it . size } } <EOL> val paddingIdx : T = filling . toPrimitiveType ( ) <EOL> return mk . d3array ( data . size , maxLength2Dim , maxLength3Dim ) { idx -> <EOL> val dim1 = idx / ( maxLength2Dim * maxLength3Dim ) <EOL> val dim2 = ( idx / maxLength3Dim ) % maxLength2Dim <EOL> val dim3 = idx % maxLength3Dim <EOL> if ( dim2 < data [ dim1 ] . size && dim3 < data [ dim1 ] [ dim2 ] . size ) { <EOL> data [ dim1 ] [ dim2 ] [ dim3 ] <EOL> } else { <EOL> paddingIdx <EOL> } <EOL> } <EOL> }

/**
 * Creates [NDArray] of 3rd dims filled with values from `data`.
 * Sequences in the batch can have a different number of elements the maximum length will be chosen for each dimension.
 * Smaller sequences will be filled with [filling] to the maximum length.
 */


@ ExperimentalMultikApi <EOL> @ JvmName ( "<STR_LIT>" ) <EOL> public inline fun < reified T : Number > Multik . createAlignedNDArray ( data : Array < Array < Array < T > > > , filling : Double = <NUM_LIT:0.0> ) : D3Array < T >

= this . createAlignedNDArray ( data . map { it2d -> it2d . map { it3d -> it3d . asList ( ) } } , filling )


@ ExperimentalMultikApi <EOL> @ JvmName ( "<STR_LIT>" ) <EOL> public inline fun < reified T : Number > Multik . createAlignedNDArray ( data : List < List < List < List < T > > > > , filling : Double = <NUM_LIT:0.0> ) : D4Array < T >

{ <EOL> require ( data . isNotEmpty ( ) ) <EOL> val maxLength2Dim = data . maxOf { it2d -> it2d . size } <EOL> val maxLength3Dim = data . maxOf { it2d -> it2d . maxOf { it3d -> it3d . size } } <EOL> val maxLength4Dim = data . maxOf { it2d -> it2d . maxOf { it3d -> it3d . maxOf { it4d -> it4d . size } } } <EOL> val paddingIdx : T = filling . toPrimitiveType ( ) <EOL> return this . d4array ( data . size , maxLength2Dim , maxLength3Dim , maxLength4Dim ) { idx -> <EOL> val dim1 = idx / ( maxLength2Dim * maxLength3Dim * maxLength4Dim ) <EOL> val dim2 = ( idx / ( maxLength3Dim * maxLength4Dim ) ) % maxLength2Dim <EOL> val dim3 = ( idx / maxLength4Dim ) % maxLength3Dim <EOL> val dim4 = idx % maxLength4Dim <EOL> if ( dim2 < data [ dim1 ] . size && dim3 < data [ dim1 ] [ dim2 ] . size && dim4 < data [ dim1 ] [ dim2 ] [ dim3 ] . size ) { <EOL> data [ dim1 ] [ dim2 ] [ dim3 ] [ dim4 ] <EOL> } else { <EOL> paddingIdx <EOL> } <EOL> } <EOL> }


@ ExperimentalMultikApi <EOL> @ JvmName ( "<STR_LIT>" ) <EOL> public inline fun < reified T : Number > Multik . createAlignedNDArray ( data : Array < Array < Array < Array < T > > > > , filling : Double = <NUM_LIT:0.0> ) : D4Array < T >

= <EOL> this . createAlignedNDArray ( data . map { it2d -> it2d . map { it3d -> it3d . map { it4d -> it4d . asList ( ) } } } , filling )


public fun convert ( output : OrtSession . Result ) : R

/**
 * Converts raw model output to the result.
 */


{ <EOL> val preprocessedInput = preprocessing . apply ( input ) <EOL> return internalModel . predict ( preprocessedInput ) { convert ( it ) } <EOL> }

/**
 * Makes prediction on the given [input].
 */


abstract fun isImplies ( other : ESEffect ) : Boolean ?

/**
 * Returns:
 * - true, when presence of `this`-effect necessary implies presence of `other`-effect
 * - false, when presence of `this`-effect necessary implies absence of `other`-effect
 * - null, when presence of `this`-effect doesn't implies neither presence nor absence of `other`-effect
 */


public fun KtClassLikeSymbol . getSamConstructor ( ) : KtSamConstructorSymbol ?

= <EOL> withValidityAssertion { analysisSession . samResolver . getSamConstructor ( this ) }

/**
 * Returns [KtSamConstructorSymbol] if the given [KtClassLikeSymbol] is a functional interface type, a.k.a. SAM.
 */


fun supertypes ( type : CirClassType ) : Set < CirClassType >

/**
 * Resolves all *declared* supertypes (not their transitive closure)
 */


fun setExecutionSourceFrom ( classpath : FileCollection , testClassesDirs : FileCollection )

/**
 * Select the exact [classpath] to run the tests from.
 *
 * Only the classes from [testClasses] will be treated as tests.
 *
 * This overrides other [KotlinExecution.executionSource] selection options.
 */


public fun KtType . translateType ( ) : SirType

/**
 * Translates the given [KtType] to [SirType].
 */


public fun KtSymbolWithVisibility . sirVisibility ( ) : SirVisibility ?

/**
 * Determines visibility of the given [KtSymbolWithVisibility].
 * @return null if symbol should not be exposed to SIR completely.
 */


fun ConeClassLikeType . fullyExpandedType ( useSiteSession : FirSession , expandedConeType : ( FirTypeAlias ) -> ConeClassLikeType ? = { alias -> <EOL> alias . lazyResolveToPhase ( FirResolvePhase . SUPER_TYPES ) <EOL> alias . expandedConeType <EOL> } , ) : ConeClassLikeType

{ <EOL> if ( this is ConeClassLikeTypeImpl ) { <EOL> val ( cachedSession , cachedExpandedType ) = cachedExpandedType <EOL> if ( cachedSession === useSiteSession && cachedExpandedType != null ) { <EOL> return cachedExpandedType <EOL> } <EOL> val computedExpandedType = fullyExpandedTypeNoCache ( useSiteSession , expandedConeType ) <EOL> this . cachedExpandedType = WeakPair ( useSiteSession , computedExpandedType ) <EOL> return computedExpandedType <EOL> } <EOL> return fullyExpandedTypeNoCache ( useSiteSession , expandedConeType ) <EOL> }

/**
 * Compute the recursive type-alias expansion in the given type.
 *
 * A type of an expect class, that is actualized by a typealias will be expanded to the expansion of the typealias,
 * when supplied with the session of actual.
 *
 * See `/docs/fir/k2_kmp.md`
 *
 * @param useSiteSession Session to be used for classifier lookups, see [toSymbol]
 * @return Type, that is expanded to the concrete class type w.r.t to the [useSiteSession]
 */


fun ConeKotlinType . fullyExpandedType ( useSiteSession : FirSession ) : ConeKotlinType

= when ( this ) { <EOL> is ConeDynamicType -> this <EOL> is ConeFlexibleType -> <EOL> ConeFlexibleType ( lowerBound . fullyExpandedType ( useSiteSession ) , upperBound . fullyExpandedType ( useSiteSession ) ) <EOL> is ConeClassLikeType -> fullyExpandedType ( useSiteSession ) <EOL> else -> this <EOL> }


fun ConeSimpleKotlinType . fullyExpandedType ( useSiteSession : FirSession ) : ConeSimpleKotlinType

= when ( this ) { <EOL> is ConeClassLikeType -> fullyExpandedType ( useSiteSession ) <EOL> else -> this <EOL> }


fun FirTypeAlias . fullyExpandedConeType ( useSiteSession : FirSession ) : ConeClassLikeType ?

{ <EOL> return expandedConeType ? . fullyExpandedType ( useSiteSession ) <EOL> }


fun FirTypeAlias . fullyExpandedClass ( session : FirSession ) : FirClassLikeDeclaration ?

{ <EOL> return fullyExpandedConeType ( session ) ? . toSymbol ( session ) ? . fir <EOL> }


@ ExperimentalReflectionOnLambdas <EOL> fun < R > Function < R > . reflect ( ) : KFunction < R > ?

{ <EOL> val annotation = javaClass . getAnnotation ( Metadata :: class . java ) ? : return null <EOL> val data = annotation . data1 . takeUnless ( Array < String > :: isEmpty ) ? : return null <EOL> val ( nameResolver , proto ) = JvmProtoBufUtil . readFunctionDataFrom ( data , annotation . data2 ) <EOL> val metadataVersion = JvmMetadataVersion ( annotation . metadataVersion , ( annotation . extraInt and JvmAnnotationNames . METADATA_STRICT_VERSION_SEMANTICS_FLAG ) != <NUM_LIT:0> ) <EOL> val descriptor = deserializeToDescriptor ( javaClass , proto , nameResolver , TypeTable ( proto . typeTable ) , metadataVersion , MemberDeserializer :: loadFunction ) <EOL> @ Suppress ( "<STR_LIT:UNCHECKED_CAST>" ) <EOL> return KFunctionImpl ( EmptyContainerForLocal , descriptor ) as KFunction < R > <EOL> }

/**
 * This is an experimental API. Given a class for a compiled Kotlin lambda or a function expression,
 * returns a [KFunction] instance providing introspection capabilities for that lambda or function expression and its parameters.
 * Not all features are currently supported, in particular [KCallable.call] and [KCallable.callBy] will fail at the moment.
 */


= locked ( lock ) { <EOL> size_ = <NUM_LIT:0> <EOL> }

/**
 * Reset the data buffer, makings its size 0.
 */


public fun append ( data : MutableData ) : Unit

= locked ( lock ) { <EOL> val toCopy = data . size <EOL> val where = resizeDataLocked ( size + toCopy ) <EOL> data . copyInto ( buffer , <NUM_LIT:0> , toCopy , where ) <EOL> }


public fun append ( data : ByteArray , fromIndex : Int = <NUM_LIT:0> , toIndex : Int = data . size ) : Unit

= locked ( lock ) { <EOL> if ( fromIndex > toIndex ) <EOL> throw IndexOutOfBoundsException ( "<STR_LIT>" ) <EOL> if ( fromIndex == toIndex ) return <EOL> val where = resizeDataLocked ( this . size + ( toIndex - fromIndex ) ) <EOL> data . copyInto ( buffer , where , fromIndex , toIndex ) <EOL> }

/**
 * Appends byte array to the buffer.
 */


public fun append ( data : COpaquePointer ? , count : Int ) : Unit

= locked ( lock ) { <EOL> if ( data == null || count <= <NUM_LIT:0> ) return <EOL> val where = resizeDataLocked ( this . size + count ) <EOL> buffer . usePinned { <EOL> it -> CopyMemory ( it . addressOf ( where ) , data , count ) <EOL> } <EOL> }

/**
 * Appends C data to the buffer, if `data` is null or `count` is non-positive - return.
 */


public fun copyInto ( output : ByteArray , destinationIndex : Int , startIndex : Int , endIndex : Int ) : Unit

= locked ( lock ) { <EOL> buffer . copyInto ( output , destinationIndex , startIndex , endIndex ) <EOL> }

/**
 * Copies range of mutable data to the byte array.
 */


public operator fun get ( index : Int ) : Byte

= locked ( lock ) { <EOL> if ( index >= size ) <EOL> throw IndexOutOfBoundsException ( "<STR_LIT>" ) <EOL> buffer [ index ] <EOL> }

/**
 * Get a byte from the mutable data.
 *
 * @Throws IndexOutOfBoundsException if index is beyond range.
 */


public fun < R > withPointerLocked ( block : ( COpaquePointer , dataSize : Int ) -> R ) : R

= locked ( lock ) { <EOL> buffer . usePinned { <EOL> it -> block ( it . addressOf ( <NUM_LIT:0> ) , size ) <EOL> } <EOL> }

/**
 * Executes provided block under lock with raw pointer to the data stored in the buffer.
 * Block is executed under the spinlock, and must be short.
 */


public fun < R > withBufferLocked ( block : ( array : ByteArray , dataSize : Int ) -> R ) : R

= locked ( lock ) { <EOL> block ( buffer , size ) <EOL> }

/**
 * Executes provided block under lock with the raw data buffer.
 * Block is executed under the spinlock, and must be short.
 */


@ Suppress ( "<STR_LIT:DuplicatedCode>" ) <EOL> internal fun upperHessenbergFloat ( a : MultiArray < ComplexFloat , D2 > ) : Pair < D2Array < ComplexFloat > , D2Array < ComplexFloat > >

{ <EOL> val ( n , m ) = a . shape <EOL> var id = mk . identity < ComplexFloat > ( n ) <EOL> var ans = a as D2Array < ComplexFloat > <EOL> for ( i in <NUM_LIT:1> until n - <NUM_LIT:1> ) { <EOL> val ( tau , v ) = householderTransformComplexFloat ( ans [ i until n , ( i - <NUM_LIT:1> ) until m ] ) <EOL> var submatrix = ans [ i until n , ( i - <NUM_LIT:1> ) until m ] <EOL> submatrix = applyHouseholderComplexFloat ( submatrix , tau , v ) <EOL> for ( i1 in i until n ) { <EOL> for ( j1 in i - <NUM_LIT:1> until m ) { <EOL> ans [ i1 , j1 ] = submatrix [ i1 - i , j1 - ( i - <NUM_LIT:1> ) ] <EOL> } <EOL> } <EOL> ans = ans . conjTranspose ( ) <EOL> submatrix = ans [ i until n , <NUM_LIT:0> until m ] <EOL> submatrix = applyHouseholderComplexFloat ( submatrix , tau , v ) <EOL> for ( i1 in i until n ) { <EOL> for ( j1 in <NUM_LIT:0> until m ) { <EOL> ans [ i1 , j1 ] = submatrix [ i1 - i , j1 ] <EOL> } <EOL> } <EOL> ans = ans . conjTranspose ( ) <EOL> submatrix = applyHouseholderComplexFloat ( id [ i until id . shape [ <NUM_LIT:0> ] , <NUM_LIT:0> until id . shape [ <NUM_LIT:1> ] ] , tau , v ) <EOL> for ( i1 in i until id . shape [ <NUM_LIT:0> ] ) { <EOL> for ( j1 in <NUM_LIT:0> until id . shape [ <NUM_LIT:1> ] ) { <EOL> id [ i1 , j1 ] = submatrix [ i1 - i , j1 ] <EOL> } <EOL> } <EOL> } <EOL> id = id . conjTranspose ( ) <EOL> for ( i in <NUM_LIT:2> until n ) { <EOL> for ( j in <NUM_LIT:0> until i - <NUM_LIT:1> ) { <EOL> ans [ i , j ] = ComplexFloat . zero <EOL> } <EOL> } <EOL> return Pair ( id , ans ) <EOL> }

/**
 * computes Q, H matrices that
 *
 * a = Q * H * Q.H
 *
 * Q is unitary: Q * Q.H = Id
 *
 * H has all zeros below main subdiagonal:
 *
 * [#, #, #, #]
 *
 * [#, #, #, #]
 *
 * [0, #, #, #]
 *
 * [0, 0, #, #]
 *
 * NOTE: inplace function, change matrix [a]
 */


private fun jumpDataFlowFromPostponedLambdas ( symbol : FirFunctionSymbol < * > )

{ <EOL> val currentLevelExits = postponedLambdaExits . pop ( ) . exits <EOL> if ( currentLevelExits . isEmpty ( ) ) return <EOL> for ( ( lambdas , exits ) in postponedLambdaExits . all ( ) ) { <EOL> if ( symbol in lambdas ) { <EOL> exits . addAll ( currentLevelExits ) <EOL> break <EOL> } <EOL> } <EOL> }

/**
 * Pop and add the current level exits (if any) to the exit corresponding with the specified
 * lambda function symbol. This is used when a postponed lambda is present within a return
 * statement for an outer lambda and data-flow information needs to be preserved.
 */


private fun FirClass . firstInPlaceInitializer ( ) : FirDeclaration ?

{ <EOL> return declarations . find { <EOL> it is FirControlFlowGraphOwner && <EOL> ( it !is FirConstructor || it . isPrimary ) && <EOL> it . isUsedInControlFlowGraphBuilderForClass <EOL> } <EOL> }

/**
 * The first in-place initializer is either:
 * 1. The primary constructor.
 * 2. The first property or anonymous initializer.
 */


fun exitEqualityOperatorCall ( equalityOperatorCall : FirEqualityOperatorCall ) : Pair < CFGNode < * > , EqualityOperatorCallNode >

{ <EOL> val lhsExitNode = equalityOperatorCallLhsExitNodes . pop ( ) <EOL> val node = createEqualityOperatorCallNode ( equalityOperatorCall ) . also { addNewSimpleNode ( it ) } <EOL> return lhsExitNode to node <EOL> }

/**
 * Returns a pair of nodes, where the first is the last node of the LHS of the equality operator
 * call, and the second is the exit node of the equality operator call. This allows DFA to
 * determine if an assignment took place within the RHS of the equality operator call.
 */


private fun completeFunctionCall ( node : FunctionCallNode ) : Boolean

{ <EOL> if ( ! node . fir . hasNothingType ) return false <EOL> val stub = StubNode ( node . owner , node . level ) <EOL> val edges = node . followingNodes . map { it to node . edgeTo ( it ) } <EOL> CFGNode . removeAllOutgoingEdges ( node ) <EOL> CFGNode . addEdge ( node , stub , EdgeKind . DeadForward , propagateDeadness = false ) <EOL> for ( ( to , edge ) in edges ) { <EOL> val kind = if ( edge . kind . isBack ) EdgeKind . DeadBackward else EdgeKind . DeadForward <EOL> CFGNode . addEdge ( stub , to , kind , propagateDeadness = false , label = edge . label ) <EOL> to . updateDeadStatus ( ) <EOL> propagateDeadnessForward ( to ) <EOL> } <EOL> return true <EOL> }

/**
 * this is a workaround to make function call dead when call is completed _after_ building its node in the graph
 * this happens when completing the last call in try/catch blocks
 * @returns `true` if node actually returned Nothing
 */


{ <EOL> val exitNode = exitFunctionCallArgumentsNodes . topOrNull ( ) <EOL> exitNode ? . explicitReceiverExitNode = lastNode <EOL> }

/**
 * Saves the last node as the currents exit function arguments call
 * explicit receiver.
 *
 * If the exit node is null this function does nothing.
 * There is no corresponding enterCall for this function.
 *
 * This is later used to rewind the implicit receiver stack to the point
 * before function arguments have been resolved so that casts within the
 * call arguments do not affect the method resolution.
 */


public fun extensionReceiverType ( type : ConeKotlinType )

{ <EOL> extensionReceiverType { type } <EOL> }

/**
 * Sets [type] as extension receiver type of the function.
 */


public fun extensionReceiverType ( typeProvider : ( List < FirTypeParameter > ) -> ConeKotlinType )

{ <EOL> require ( extensionReceiverTypeProvider == null ) { "<STR_LIT>" } <EOL> extensionReceiverTypeProvider = typeProvider <EOL> }

/**
 * Sets type, provided by [typeProvider], as extension receiver type of the function.
 *
 * Use this overload when extension receiver type references type parameters of the function.
 */


public fun FirExtension . createMemberFunction ( owner : FirClassSymbol < * > , key : GeneratedDeclarationKey , name : Name , returnType : ConeKotlinType , config : SimpleFunctionBuildingContext . ( ) -> Unit = { } ) : FirSimpleFunction

{ <EOL> return createMemberFunction ( owner , key , name , { returnType } , config ) <EOL> }

/**
 * Creates a member function for [owner] class with specified [returnType].
 *
 * Type and value parameters can be configured with [config] builder.
 */


public fun FirExtension . createMemberFunction ( owner : FirClassSymbol < * > , key : GeneratedDeclarationKey , name : Name , returnTypeProvider : ( List < FirTypeParameter > ) -> ConeKotlinType , config : SimpleFunctionBuildingContext . ( ) -> Unit = { } ) : FirSimpleFunction

{ <EOL> val callableId = CallableId ( owner . classId , name ) <EOL> return SimpleFunctionBuildingContext ( session , key , owner , callableId , returnTypeProvider ) . apply ( config ) . apply { <EOL> status { <EOL> isExpect = owner . isExpect <EOL> } <EOL> } . build ( ) <EOL> }

/**
 * Creates a member function for [owner] class with return type provided by [returnTypeProvider].
 * Use this overload when return type references type parameters of created function.
 *
 * Type and value parameters can be configured with [config] builder.
 */


@ ExperimentalTopLevelDeclarationsGenerationApi <EOL> public fun FirExtension . createTopLevelFunction ( key : GeneratedDeclarationKey , callableId : CallableId , returnType : ConeKotlinType , config : SimpleFunctionBuildingContext . ( ) -> Unit = { } ) : FirSimpleFunction

{ <EOL> return createTopLevelFunction ( key , callableId , { returnType } , config ) <EOL> }

/**
 * Creates a top-level function with [callableId] and specified [returnType].
 *
 * Type and value parameters can be configured with [config] builder.
 */