package androidx.media3.extractor;

/* JADX INFO: loaded from: classes.dex */
public final class f {

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

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

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

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

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

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

    public f(int i10, int i11, int i12, int i13, int i14, int i15) {
        this.f3360a = i14;
        if (i14 != 3) {
            this.f3361b = i10;
            this.f3362c = i13;
            this.f3363d = i11;
            this.f3364e = i12;
            this.f3365f = i11 + i12;
            return;
        }
        this.f3365f = -1;
        this.f3361b = i10;
        this.f3362c = i11;
        this.f3363d = i12;
        this.f3364e = i13;
    }

    public final boolean a() {
        int i10 = this.f3361b;
        int i11 = 2;
        if ((i10 & 7) != 0) {
            int i12 = this.f3364e;
            int i13 = this.f3362c;
            if (((i12 > i13 ? 1 : i12 == i13 ? 2 : 4) & i10) == 0) {
                return false;
            }
        }
        if ((i10 & 112) != 0) {
            int i14 = this.f3364e;
            int i15 = this.f3363d;
            if ((((i14 > i15 ? 1 : i14 == i15 ? 2 : 4) << 4) & i10) == 0) {
                return false;
            }
        }
        if ((i10 & 1792) != 0) {
            int i16 = this.f3365f;
            int i17 = this.f3362c;
            if ((((i16 > i17 ? 1 : i16 == i17 ? 2 : 4) << 8) & i10) == 0) {
                return false;
            }
        }
        if ((i10 & 28672) != 0) {
            int i18 = this.f3365f;
            int i19 = this.f3363d;
            if (i18 > i19) {
                i11 = 1;
            } else if (i18 != i19) {
                i11 = 4;
            }
            if ((i10 & (i11 << 12)) == 0) {
                return false;
            }
        }
        return true;
    }

    public final boolean b(int i10) {
        return i10 != -1 && this.f3363d == (i10 % 3) * 3;
    }

    public final void c() {
        this.f3365f = (this.f3363d / 3) + ((this.f3364e / 30) * 3);
    }

    public final String toString() {
        switch (this.f3360a) {
            case 3:
                return this.f3365f + "|" + this.f3364e;
            default:
                return super.toString();
        }
    }

    /* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ f(int i10, int i11, int i12, int i13) {
        this(i10, i11, i12, i13, 0);
        this.f3360a = 0;
    }

    public f(int i10, int i11, int i12, int i13, int i14) {
        this.f3360a = 0;
        this.f3361b = i10;
        this.f3363d = 2;
        this.f3362c = i11;
        this.f3364e = i12;
        this.f3365f = i13;
    }

    public f() {
        this.f3360a = 1;
        this.f3361b = 0;
    }
}
