package y7;

import A6.n;
import O6.p;
import P6.m;
import java.io.IOException;
import n4.u0;
import x7.B;

/* JADX INFO: loaded from: classes.dex */
public final class g extends P6.h implements p {

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final /* synthetic */ int f19069r = 0;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public final /* synthetic */ B f19070s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public final /* synthetic */ m f19071t;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public final /* synthetic */ m f19072u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final /* synthetic */ m f19073v;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public g(m mVar, B b8, m mVar2, m mVar3) {
        super(2);
        this.f19071t = mVar;
        this.f19070s = b8;
        this.f19072u = mVar2;
        this.f19073v = mVar3;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) throws IOException {
        switch (this.f19069r) {
            case u0.f15495q /* 0 */:
                int iIntValue = ((Number) obj).intValue();
                long jLongValue = ((Number) obj2).longValue();
                if (iIntValue == 1) {
                    m mVar = this.f19071t;
                    if (mVar.f5535q != null) {
                        throw new IOException("bad zip: NTFS extra attribute tag 0x0001 repeated");
                    }
                    if (jLongValue != 24) {
                        throw new IOException("bad zip: NTFS extra attribute tag 0x0001 size != 24");
                    }
                    B b8 = this.f19070s;
                    mVar.f5535q = Long.valueOf(b8.r());
                    this.f19072u.f5535q = Long.valueOf(b8.r());
                    this.f19073v.f5535q = Long.valueOf(b8.r());
                }
                return n.f457a;
            default:
                int iIntValue2 = ((Number) obj).intValue();
                long jLongValue2 = ((Number) obj2).longValue();
                if (iIntValue2 == 21589) {
                    if (jLongValue2 < 1) {
                        throw new IOException("bad zip: extended timestamp extra too short");
                    }
                    B b9 = this.f19070s;
                    byte bG = b9.g();
                    boolean z8 = (bG & 1) == 1;
                    boolean z9 = (bG & 2) == 2;
                    boolean z10 = (bG & 4) == 4;
                    long j8 = z8 ? 5L : 1L;
                    if (z9) {
                        j8 += 4;
                    }
                    if (z10) {
                        j8 += 4;
                    }
                    if (jLongValue2 < j8) {
                        throw new IOException("bad zip: extended timestamp extra too short");
                    }
                    if (z8) {
                        this.f19071t.f5535q = Integer.valueOf(b9.n());
                    }
                    if (z9) {
                        this.f19072u.f5535q = Integer.valueOf(b9.n());
                    }
                    if (z10) {
                        this.f19073v.f5535q = Integer.valueOf(b9.n());
                    }
                }
                return n.f457a;
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public g(B b8, m mVar, m mVar2, m mVar3) {
        super(2);
        this.f19070s = b8;
        this.f19071t = mVar;
        this.f19072u = mVar2;
        this.f19073v = mVar3;
    }
}
