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

import java.nio.ByteBuffer;
import java.nio.ByteOrder;

/* JADX INFO: loaded from: classes2.dex */
public abstract class y80 implements i80 {

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

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

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public s60 f18751e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public ByteBuffer f18752f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public ByteBuffer f18753g;

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

    public y80() {
        ByteBuffer byteBuffer = i80.f12407a;
        this.f18752f = byteBuffer;
        this.f18753g = byteBuffer;
        s60 s60Var = s60.f16306e;
        this.f18750d = s60Var;
        this.f18751e = s60Var;
        this.f18748b = s60Var;
        this.f18749c = s60Var;
    }

    @Override // com.google.android.gms.internal.ads.i80
    public final s60 c(s60 s60Var) {
        this.f18750d = s60Var;
        this.f18751e = e(s60Var);
        return zzc() ? this.f18751e : s60.f16306e;
    }

    public final ByteBuffer d(int i10) {
        if (this.f18752f.capacity() < i10) {
            this.f18752f = ByteBuffer.allocateDirect(i10).order(ByteOrder.nativeOrder());
        } else {
            this.f18752f.clear();
        }
        ByteBuffer byteBuffer = this.f18752f;
        this.f18753g = byteBuffer;
        return byteBuffer;
    }

    public abstract s60 e(s60 s60Var);

    public void f() {
    }

    public void g() {
    }

    public void h() {
    }

    @Override // com.google.android.gms.internal.ads.i80
    public boolean zzc() {
        return this.f18751e != s60.f16306e;
    }

    @Override // com.google.android.gms.internal.ads.i80
    public final void zze() {
        this.f18754h = true;
        f();
    }

    @Override // com.google.android.gms.internal.ads.i80
    public ByteBuffer zzf() {
        ByteBuffer byteBuffer = this.f18753g;
        this.f18753g = i80.f12407a;
        return byteBuffer;
    }

    @Override // com.google.android.gms.internal.ads.i80
    public boolean zzg() {
        return this.f18754h && this.f18753g == i80.f12407a;
    }

    @Override // com.google.android.gms.internal.ads.i80
    public final void zzi() {
        this.f18753g = i80.f12407a;
        this.f18754h = false;
        this.f18748b = this.f18750d;
        this.f18749c = this.f18751e;
        g();
    }

    @Override // com.google.android.gms.internal.ads.i80
    public final void zzj() {
        ByteBuffer byteBuffer = i80.f12407a;
        this.f18753g = byteBuffer;
        this.f18754h = false;
        this.f18752f = byteBuffer;
        s60 s60Var = s60.f16306e;
        this.f18750d = s60Var;
        this.f18751e = s60Var;
        this.f18748b = s60Var;
        this.f18749c = s60Var;
        h();
    }
}
