package com.bumptech.glide.load.engine;

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

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final q5.g f5772b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ u f5773c;

    public /* synthetic */ r(u uVar, q5.g gVar, int i10) {
        this.f5771a = i10;
        this.f5773c = uVar;
        this.f5772b = gVar;
    }

    @Override // java.lang.Runnable
    public final void run() {
        CallbackException callbackException;
        switch (this.f5771a) {
            case 0:
                com.bumptech.glide.request.a aVar = (com.bumptech.glide.request.a) this.f5772b;
                aVar.f5863a.a();
                synchronized (aVar.f5864b) {
                    synchronized (this.f5773c) {
                        try {
                            t tVar = this.f5773c.f5778a;
                            q5.g gVar = this.f5772b;
                            tVar.getClass();
                            if (tVar.f5776a.contains(new s(gVar, t5.g.f32965b))) {
                                u uVar = this.f5773c;
                                q5.g gVar2 = this.f5772b;
                                uVar.getClass();
                                try {
                                    ((com.bumptech.glide.request.a) gVar2).h(uVar.W, 5);
                                } finally {
                                }
                            }
                            this.f5773c.c();
                        } finally {
                        }
                        break;
                    }
                }
                return;
            default:
                com.bumptech.glide.request.a aVar2 = (com.bumptech.glide.request.a) this.f5772b;
                aVar2.f5863a.a();
                synchronized (aVar2.f5864b) {
                    synchronized (this.f5773c) {
                        try {
                            t tVar2 = this.f5773c.f5778a;
                            q5.g gVar3 = this.f5772b;
                            tVar2.getClass();
                            if (tVar2.f5776a.contains(new s(gVar3, t5.g.f32965b))) {
                                this.f5773c.Y.c();
                                u uVar2 = this.f5773c;
                                q5.g gVar4 = this.f5772b;
                                uVar2.getClass();
                                try {
                                    ((com.bumptech.glide.request.a) gVar4).k(uVar2.Y, uVar2.U, uVar2.f5781b0);
                                    this.f5773c.h(this.f5772b);
                                } finally {
                                }
                            }
                            this.f5773c.c();
                        } finally {
                        }
                    }
                }
                return;
        }
    }
}
