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

import java.util.NoSuchElementException;
import java.util.Objects;

/* JADX INFO: loaded from: classes2.dex */
public final class gc2 extends ct1 {

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public gc2(zzidt zzidtVar) {
        super(1);
        Objects.requireNonNull(zzidtVar);
        this.f11718b = new hc2(zzidtVar);
        this.f11719c = a();
    }

    public final ia2 a() {
        hc2 hc2Var = this.f11718b;
        if (hc2Var.hasNext()) {
            return new ia2(hc2Var.next());
        }
        return null;
    }

    @Override // java.util.Iterator
    public final boolean hasNext() {
        return this.f11719c != null;
    }

    @Override // com.google.android.gms.internal.ads.ct1
    public final byte zza() {
        ct1 ct1Var = this.f11719c;
        if (ct1Var == null) {
            throw new NoSuchElementException();
        }
        byte bZza = ct1Var.zza();
        if (!this.f11719c.hasNext()) {
            this.f11719c = a();
        }
        return bZza;
    }
}
