package com.bumptech.glide.load.engine;

/* JADX INFO: loaded from: classes.dex */
public final class d0 implements e0, u5.b {

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final xyz.stream.utils.t f5658e = u5.d.a(20, new com.google.android.gms.measurement.internal.a0(8));

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final u5.e f5659a = new u5.e();

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public e0 f5660b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public boolean f5661c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public boolean f5662d;

    @Override // com.bumptech.glide.load.engine.e0
    public final synchronized void a() {
        this.f5659a.a();
        this.f5662d = true;
        if (!this.f5661c) {
            this.f5660b.a();
            this.f5660b = null;
            f5658e.a(this);
        }
    }

    @Override // com.bumptech.glide.load.engine.e0
    public final Class b() {
        return this.f5660b.b();
    }

    public final synchronized void c() {
        this.f5659a.a();
        if (!this.f5661c) {
            throw new IllegalStateException("Already unlocked");
        }
        this.f5661c = false;
        if (this.f5662d) {
            a();
        }
    }

    @Override // u5.b
    public final u5.e d() {
        return this.f5659a;
    }

    @Override // com.bumptech.glide.load.engine.e0
    public final Object get() {
        return this.f5660b.get();
    }

    @Override // com.bumptech.glide.load.engine.e0
    public final int getSize() {
        return this.f5660b.getSize();
    }
}
