package o;

import java.util.List;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.v6, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2687v6 implements InterfaceC2235qO {
    public final B6 a;

    public C2687v6(B6 b6) {
        this.a = b6;
    }

    @Override // o.InterfaceC2235qO
    public final InterfaceC2329rO a(InterfaceC2424sO interfaceC2424sO, List list, long j) {
        VW vw;
        int i;
        VW vw2;
        int i2;
        int i3;
        int size = list.size();
        VW[] vwArr = new VW[size];
        int size2 = list.size();
        long j2 = 0;
        int i4 = 0;
        while (true) {
            vw = null;
            i = 1;
            if (i4 >= size2) {
                break;
            }
            InterfaceC1760lO interfaceC1760lO = (InterfaceC1760lO) list.get(i4);
            Object objK = interfaceC1760lO.k();
            C2877x6 c2877x6 = objK instanceof C2877x6 ? (C2877x6) objK : null;
            if (c2877x6 != null && ((Boolean) c2877x6.a.getValue()).booleanValue()) {
                vwArr[i4] = interfaceC1760lO.c(j);
                j2 = (r7.m & 4294967295L) | (r7.l << 32);
            }
            i4++;
        }
        int size3 = list.size();
        for (int i5 = 0; i5 < size3; i5++) {
            InterfaceC1760lO interfaceC1760lO2 = (InterfaceC1760lO) list.get(i5);
            if (vwArr[i5] == null) {
                vwArr[i5] = interfaceC1760lO2.c(j);
            }
        }
        if (interfaceC2424sO.w()) {
            i2 = (int) (j2 >> 32);
        } else {
            if (size == 0) {
                vw2 = null;
            } else {
                vw2 = vwArr[0];
                int i6 = size - 1;
                if (i6 != 0) {
                    int i7 = vw2 != null ? vw2.l : 0;
                    if (1 <= i6) {
                        int i8 = 1;
                        while (true) {
                            VW vw3 = vwArr[i8];
                            int i9 = vw3 != null ? vw3.l : 0;
                            if (i7 < i9) {
                                vw2 = vw3;
                                i7 = i9;
                            }
                            if (i8 == i6) {
                                break;
                            }
                            i8++;
                        }
                    }
                }
            }
            i2 = vw2 != null ? vw2.l : 0;
        }
        if (interfaceC2424sO.w()) {
            i3 = (int) (j2 & 4294967295L);
        } else {
            if (size != 0) {
                vw = vwArr[0];
                int i10 = size - 1;
                if (i10 != 0) {
                    int i11 = vw != null ? vw.m : 0;
                    if (1 <= i10) {
                        while (true) {
                            VW vw4 = vwArr[i];
                            int i12 = vw4 != null ? vw4.m : 0;
                            if (i11 < i12) {
                                vw = vw4;
                                i11 = i12;
                            }
                            if (i == i10) {
                                break;
                            }
                            i++;
                        }
                    }
                }
            }
            i3 = vw != null ? vw.m : 0;
        }
        if (!interfaceC2424sO.w()) {
            this.a.b.setValue(new C1470iI((i2 << 32) | (i3 & 4294967295L)));
        }
        return interfaceC2424sO.H(i2, i3, C0358Nv.l, new C2592u6(vwArr, this, i2, i3));
    }

    @Override // o.InterfaceC2235qO
    public final int c(InterfaceC2608uI interfaceC2608uI, List list, int i) {
        Integer numValueOf;
        if (list.isEmpty()) {
            numValueOf = null;
        } else {
            numValueOf = Integer.valueOf(((InterfaceC1760lO) list.get(0)).d(i));
            int iR = AbstractC0008Ai.R(list);
            int i2 = 1;
            if (1 <= iR) {
                while (true) {
                    Integer numValueOf2 = Integer.valueOf(((InterfaceC1760lO) list.get(i2)).d(i));
                    if (numValueOf2.compareTo(numValueOf) > 0) {
                        numValueOf = numValueOf2;
                    }
                    if (i2 == iR) {
                        break;
                    }
                    i2++;
                }
            }
        }
        if (numValueOf != null) {
            return numValueOf.intValue();
        }
        return 0;
    }

    @Override // o.InterfaceC2235qO
    public final int g(InterfaceC2608uI interfaceC2608uI, List list, int i) {
        Integer numValueOf;
        if (list.isEmpty()) {
            numValueOf = null;
        } else {
            numValueOf = Integer.valueOf(((InterfaceC1760lO) list.get(0)).V(i));
            int iR = AbstractC0008Ai.R(list);
            int i2 = 1;
            if (1 <= iR) {
                while (true) {
                    Integer numValueOf2 = Integer.valueOf(((InterfaceC1760lO) list.get(i2)).V(i));
                    if (numValueOf2.compareTo(numValueOf) > 0) {
                        numValueOf = numValueOf2;
                    }
                    if (i2 == iR) {
                        break;
                    }
                    i2++;
                }
            }
        }
        if (numValueOf != null) {
            return numValueOf.intValue();
        }
        return 0;
    }

    @Override // o.InterfaceC2235qO
    public final int i(InterfaceC2608uI interfaceC2608uI, List list, int i) {
        Integer numValueOf;
        if (list.isEmpty()) {
            numValueOf = null;
        } else {
            numValueOf = Integer.valueOf(((InterfaceC1760lO) list.get(0)).O(i));
            int iR = AbstractC0008Ai.R(list);
            int i2 = 1;
            if (1 <= iR) {
                while (true) {
                    Integer numValueOf2 = Integer.valueOf(((InterfaceC1760lO) list.get(i2)).O(i));
                    if (numValueOf2.compareTo(numValueOf) > 0) {
                        numValueOf = numValueOf2;
                    }
                    if (i2 == iR) {
                        break;
                    }
                    i2++;
                }
            }
        }
        if (numValueOf != null) {
            return numValueOf.intValue();
        }
        return 0;
    }

    @Override // o.InterfaceC2235qO
    public final int j(InterfaceC2608uI interfaceC2608uI, List list, int i) {
        Integer numValueOf;
        if (list.isEmpty()) {
            numValueOf = null;
        } else {
            numValueOf = Integer.valueOf(((InterfaceC1760lO) list.get(0)).U(i));
            int iR = AbstractC0008Ai.R(list);
            int i2 = 1;
            if (1 <= iR) {
                while (true) {
                    Integer numValueOf2 = Integer.valueOf(((InterfaceC1760lO) list.get(i2)).U(i));
                    if (numValueOf2.compareTo(numValueOf) > 0) {
                        numValueOf = numValueOf2;
                    }
                    if (i2 == iR) {
                        break;
                    }
                    i2++;
                }
            }
        }
        if (numValueOf != null) {
            return numValueOf.intValue();
        }
        return 0;
    }
}
