package defpackage;

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 = 176)
@DebugMetadata(c = "kotlinx.coroutines.sync.SemaphoreKt", f = "Semaphore.kt", i = {0, 0}, l = {81}, m = "withPermit", n = {"$this$withPermit", "action"}, s = {"L$0", "L$1"})
final class cg8<T> extends ContinuationImpl {
    public /* synthetic */ Object a;
    public int b;

    /* JADX WARN: Code restructure failed: missing block: B:14:?, code lost:
    
        throw null;
     */
    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        this.a = obj;
        int i = this.b | Integer.MIN_VALUE;
        this.b = i;
        int i2 = dg8.a;
        int i3 = i - Integer.MIN_VALUE;
        this.b = i3;
        ck1 ck1Var = ck1.a;
        if (i3 == 0) {
            s38.b(obj);
            this.b = 1;
            throw null;
        }
        if (i3 != 1) {
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
        s38.b(obj);
        throw null;
    }
}
