package defpackage;

import androidx.media3.container.NalUnitUtil;
import kotlin.Metadata;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.DebugProbesKt;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(k = 3, mv = {2, 0, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
@DebugMetadata(c = "kotlinx.coroutines.DelayKt", f = "Delay.kt", i = {}, l = {160}, m = "awaitCancellation", n = {}, s = {})
final class g32 extends ContinuationImpl {
    public /* synthetic */ Object a;
    public int b;

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Object invokeSuspend(Object obj) {
        g32 g32Var;
        this.a = obj;
        int i = this.b | Integer.MIN_VALUE;
        this.b = i;
        if ((i & Integer.MIN_VALUE) != 0) {
            this.b = i - Integer.MIN_VALUE;
            g32Var = this;
        } else {
            g32Var = new g32(this);
        }
        Object obj2 = g32Var.a;
        ck1 ck1Var = ck1.a;
        int i2 = g32Var.b;
        if (i2 == 0) {
            s38.b(obj2);
            g32Var.b = 1;
            ts0 ts0Var = new ts0(1, dr4.d(g32Var));
            ts0Var.r();
            Object objQ = ts0Var.q();
            if (objQ == ck1Var) {
                DebugProbesKt.probeCoroutineSuspended(g32Var);
            }
            if (objQ == ck1Var) {
                return ck1Var;
            }
        } else {
            if (i2 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            s38.b(obj2);
        }
        throw new a45();
    }
}
