package defpackage;

import androidx.media3.container.NalUnitUtil;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import java.io.EOFException;
import kotlin.Metadata;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(k = 3, mv = {2, 0, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
@DebugMetadata(c = "io.ktor.utils.io.ByteReadChannelOperationsKt", f = "ByteReadChannelOperations.kt", i = {0}, l = {340}, m = "discardExact", n = {AppMeasurementSdk.ConditionalUserProperty.VALUE}, s = {"J$0"})
final class in0 extends ContinuationImpl {
    public long a;
    public /* synthetic */ Object b;
    public int c;

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Object invokeSuspend(Object obj) throws EOFException {
        in0 in0Var;
        long j;
        this.b = obj;
        int i = this.c | Integer.MIN_VALUE;
        this.c = i;
        if ((i & Integer.MIN_VALUE) != 0) {
            this.c = i - Integer.MIN_VALUE;
            in0Var = this;
        } else {
            in0Var = new in0(this);
        }
        Object objC = in0Var.b;
        ck1 ck1Var = ck1.a;
        int i2 = in0Var.c;
        if (i2 == 0) {
            s38.b(objC);
            in0Var.a = 0L;
            in0Var.c = 1;
            objC = go0.c(null, 0L, in0Var);
            if (objC == ck1Var) {
                return ck1Var;
            }
            j = 0;
        } else {
            if (i2 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            j = in0Var.a;
            s38.b(objC);
        }
        if (((Number) objC).longValue() >= j) {
            return e6a.a;
        }
        throw new EOFException(fi7.e(j, "Unable to discard ", " bytes"));
    }
}
