package d3;

import android.os.Bundle;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicReference;

/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class K0 implements Runnable {

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final /* synthetic */ int f11612q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final /* synthetic */ Y0 f11613r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final /* synthetic */ AtomicReference f11614s;

    public /* synthetic */ K0(Y0 y02, AtomicReference atomicReference, int i) {
        this.f11612q = i;
        this.f11613r = y02;
        this.f11614s = atomicReference;
    }

    private final void a() {
        AtomicReference atomicReference = this.f11614s;
        synchronized (atomicReference) {
            try {
                try {
                    C0817r0 c0817r0 = (C0817r0) this.f11613r.f5146q;
                    atomicReference.set(Boolean.valueOf(c0817r0.f12148w.R(c0817r0.n().K(), I.f11535a0)));
                } finally {
                    this.f11614s.notify();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    private final void b() {
        AtomicReference atomicReference = this.f11614s;
        synchronized (atomicReference) {
            try {
                try {
                    C0817r0 c0817r0 = (C0817r0) this.f11613r.f5146q;
                    atomicReference.set(c0817r0.f12148w.Q(c0817r0.n().K(), I.f11537b0));
                } finally {
                    this.f11614s.notify();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    private final void c() {
        AtomicReference atomicReference = this.f11614s;
        synchronized (atomicReference) {
            try {
                try {
                    C0817r0 c0817r0 = (C0817r0) this.f11613r.f5146q;
                    atomicReference.set(Long.valueOf(c0817r0.f12148w.M(c0817r0.n().K(), I.f11540c0)));
                } finally {
                    this.f11614s.notify();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    private final void d() {
        AtomicReference atomicReference = this.f11614s;
        synchronized (atomicReference) {
            try {
                try {
                    C0817r0 c0817r0 = (C0817r0) this.f11613r.f5146q;
                    atomicReference.set(Integer.valueOf(c0817r0.f12148w.K(c0817r0.n().K(), I.f11543d0)));
                } finally {
                    this.f11614s.notify();
                }
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    @Override // java.lang.Runnable
    public final void run() {
        switch (this.f11612q) {
            case n4.u0.f15495q /* 0 */:
                Y0 y02 = this.f11613r;
                C0785g0 c0785g0 = ((C0817r0) y02.f5146q).f12149x;
                C0817r0.i(c0785g0);
                Bundle bundleN = c0785g0.f11960E.N();
                C0824t1 c0824t1R = ((C0817r0) y02.f5146q).r();
                c0824t1R.E();
                c0824t1R.F();
                c0824t1R.V(new O1.C(c0824t1R, this.f11614s, c0824t1R.S(false), bundleN, 5));
                return;
            case 1:
                C0824t1 c0824t1R2 = ((C0817r0) this.f11613r.f5146q).r();
                EnumC0783f1[] enumC0783f1Arr = {EnumC0783f1.f11947u};
                ArrayList arrayList = new ArrayList(1);
                arrayList.add(Integer.valueOf(enumC0783f1Arr[0].f11951q));
                I1 i12 = new I1(arrayList);
                c0824t1R2.E();
                c0824t1R2.F();
                c0824t1R2.V(new O1.C(c0824t1R2, this.f11614s, c0824t1R2.S(false), i12, 6));
                return;
            case 2:
                a();
                return;
            case 3:
                b();
                return;
            case 4:
                c();
                return;
            case 5:
                d();
                return;
            default:
                AtomicReference atomicReference = this.f11614s;
                synchronized (atomicReference) {
                    try {
                        try {
                            C0817r0 c0817r0 = (C0817r0) this.f11613r.f5146q;
                            atomicReference.set(Double.valueOf(c0817r0.f12148w.J(c0817r0.n().K(), I.f11546e0)));
                        } finally {
                            this.f11614s.notify();
                        }
                    } catch (Throwable th) {
                        throw th;
                    }
                }
                return;
        }
    }
}
