package F1;

import androidx.core.location.LocationRequestCompat;
import java.util.concurrent.locks.LockSupport;

/* JADX INFO: renamed from: F1.e, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
final class C0117e extends AbstractC0109a {

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    private final Thread f611r;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    private final AbstractC0110a0 f612x;

    public C0117e(q1.g gVar, Thread thread, AbstractC0110a0 abstractC0110a0) {
        super(gVar, true, true);
        this.f611r = thread;
        this.f612x = abstractC0110a0;
    }

    @Override // F1.u0
    protected boolean T() {
        return true;
    }

    @Override // F1.u0
    protected void p(Object obj) {
        if (kotlin.jvm.internal.l.a(Thread.currentThread(), this.f611r)) {
            return;
        }
        Thread thread = this.f611r;
        AbstractC0113c.a();
        LockSupport.unpark(thread);
    }

    public final Object w0() throws Throwable {
        AbstractC0113c.a();
        try {
            AbstractC0110a0 abstractC0110a0 = this.f612x;
            if (abstractC0110a0 != null) {
                AbstractC0110a0.G(abstractC0110a0, false, 1, null);
            }
            while (!Thread.interrupted()) {
                try {
                    AbstractC0110a0 abstractC0110a02 = this.f612x;
                    long jK = abstractC0110a02 == null ? LocationRequestCompat.PASSIVE_INTERVAL : abstractC0110a02.K();
                    if (S()) {
                        AbstractC0110a0 abstractC0110a03 = this.f612x;
                        if (abstractC0110a03 != null) {
                            AbstractC0110a0.z(abstractC0110a03, false, 1, null);
                        }
                        AbstractC0113c.a();
                        Object objH = v0.h(N());
                        C0143y c0143y = objH instanceof C0143y ? (C0143y) objH : null;
                        if (c0143y == null) {
                            return objH;
                        }
                        throw c0143y.f667a;
                    }
                    AbstractC0113c.a();
                    LockSupport.parkNanos(this, jK);
                } catch (Throwable th) {
                    AbstractC0110a0 abstractC0110a04 = this.f612x;
                    if (abstractC0110a04 != null) {
                        AbstractC0110a0.z(abstractC0110a04, false, 1, null);
                    }
                    throw th;
                }
            }
            InterruptedException interruptedException = new InterruptedException();
            v(interruptedException);
            throw interruptedException;
        } catch (Throwable th2) {
            AbstractC0113c.a();
            throw th2;
        }
    }
}
