package com.google.android.gms.internal.ads;

import androidx.annotation.Nullable;
import java.util.LinkedList;

/* JADX INFO: loaded from: classes2.dex */
public final class wb1 {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final int f18025b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final int f18026c;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final LinkedList f18024a = new LinkedList();

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final mc1 f18027d = new mc1();

    public wb1(int i10, int i11) {
        this.f18025b = i10;
        this.f18026c = i11;
    }

    public final void a() {
        while (true) {
            LinkedList linkedList = this.f18024a;
            if (linkedList.isEmpty()) {
                return;
            }
            bc1 bc1Var = (bc1) linkedList.getFirst();
            m7.n.C.f30472k.getClass();
            if (System.currentTimeMillis() - bc1Var.f9494d < this.f18026c) {
                return;
            }
            mc1 mc1Var = this.f18027d;
            mc1Var.f14071f++;
            mc1Var.f14067b.f13630b++;
            linkedList.remove();
        }
    }

    @Nullable
    public final bc1 zzb() {
        mc1 mc1Var = this.f18027d;
        mc1Var.getClass();
        m7.n.C.f30472k.getClass();
        mc1Var.f14068c = System.currentTimeMillis();
        mc1Var.f14069d++;
        a();
        LinkedList linkedList = this.f18024a;
        if (linkedList.isEmpty()) {
            return null;
        }
        bc1 bc1Var = (bc1) linkedList.remove();
        if (bc1Var != null) {
            mc1Var.f14070e++;
            mc1Var.f14067b.f13629a = true;
        }
        return bc1Var;
    }
}
