package o2;

import P6.g;
import a.AbstractC0386a;
import android.graphics.Bitmap;
import com.google.android.gms.internal.measurement.AbstractC0707u1;
import java.util.regex.Pattern;
import k7.C;
import k7.C1111c;
import k7.o;
import k7.s;
import n4.u0;
import s7.l;
import x7.A;
import x7.B;

/* JADX INFO: renamed from: o2.b, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1336b {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final Object f15632a;

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final long f15634c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final long f15635d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final boolean f15636e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final o f15637f;

    public C1336b(B b8) {
        final int i = 0;
        this.f15632a = AbstractC0707u1.j(new O6.a(this) { // from class: o2.a

            /* JADX INFO: renamed from: r, reason: collision with root package name */
            public final /* synthetic */ C1336b f15631r;

            {
                this.f15631r = this;
            }

            @Override // O6.a
            public final Object a() {
                C1336b c1336b = this.f15631r;
                switch (i) {
                    case u0.f15495q /* 0 */:
                        C1111c c1111c = C1111c.f14044n;
                        return l.v(c1336b.f15637f);
                    default:
                        String strA = c1336b.f15637f.a("Content-Type");
                        if (strA != null) {
                            Pattern pattern = s.f14130d;
                            try {
                                return AbstractC0386a.m(strA);
                            } catch (IllegalArgumentException unused) {
                            }
                        }
                        return null;
                }
            }
        });
        final int i5 = 1;
        this.f15633b = AbstractC0707u1.j(new O6.a(this) { // from class: o2.a

            /* JADX INFO: renamed from: r, reason: collision with root package name */
            public final /* synthetic */ C1336b f15631r;

            {
                this.f15631r = this;
            }

            @Override // O6.a
            public final Object a() {
                C1336b c1336b = this.f15631r;
                switch (i5) {
                    case u0.f15495q /* 0 */:
                        C1111c c1111c = C1111c.f14044n;
                        return l.v(c1336b.f15637f);
                    default:
                        String strA = c1336b.f15637f.a("Content-Type");
                        if (strA != null) {
                            Pattern pattern = s.f14130d;
                            try {
                                return AbstractC0386a.m(strA);
                            } catch (IllegalArgumentException unused) {
                            }
                        }
                        return null;
                }
            }
        });
        this.f15634c = Long.parseLong(b8.K(Long.MAX_VALUE));
        this.f15635d = Long.parseLong(b8.K(Long.MAX_VALUE));
        this.f15636e = Integer.parseInt(b8.K(Long.MAX_VALUE)) > 0;
        int i8 = Integer.parseInt(b8.K(Long.MAX_VALUE));
        N0.c cVar = new N0.c(1);
        for (int i9 = 0; i9 < i8; i9++) {
            String strK = b8.K(Long.MAX_VALUE);
            Bitmap.Config[] configArr = u2.f.f17441a;
            int iS = X6.e.S(strK, ':', 0, 6);
            if (iS == -1) {
                throw new IllegalArgumentException("Unexpected header: ".concat(strK).toString());
            }
            String strSubstring = strK.substring(0, iS);
            g.d(strSubstring, "substring(...)");
            String string = X6.e.j0(strSubstring).toString();
            String strSubstring2 = strK.substring(iS + 1);
            g.d(strSubstring2, "substring(...)");
            cVar.h(string, strSubstring2);
        }
        this.f15637f = cVar.i();
    }

    public final void a(A a3) {
        a3.a0(this.f15634c);
        a3.d0(10);
        a3.a0(this.f15635d);
        a3.d0(10);
        a3.a0(this.f15636e ? 1L : 0L);
        a3.d0(10);
        o oVar = this.f15637f;
        a3.a0(oVar.size());
        a3.d0(10);
        int size = oVar.size();
        for (int i = 0; i < size; i++) {
            a3.Y(oVar.c(i));
            a3.Y(": ");
            a3.Y(oVar.g(i));
            a3.d0(10);
        }
    }

    public C1336b(C c3) {
        final int i = 0;
        this.f15632a = AbstractC0707u1.j(new O6.a(this) { // from class: o2.a

            /* JADX INFO: renamed from: r, reason: collision with root package name */
            public final /* synthetic */ C1336b f15631r;

            {
                this.f15631r = this;
            }

            @Override // O6.a
            public final Object a() {
                C1336b c1336b = this.f15631r;
                switch (i) {
                    case u0.f15495q /* 0 */:
                        C1111c c1111c = C1111c.f14044n;
                        return l.v(c1336b.f15637f);
                    default:
                        String strA = c1336b.f15637f.a("Content-Type");
                        if (strA != null) {
                            Pattern pattern = s.f14130d;
                            try {
                                return AbstractC0386a.m(strA);
                            } catch (IllegalArgumentException unused) {
                            }
                        }
                        return null;
                }
            }
        });
        final int i5 = 1;
        this.f15633b = AbstractC0707u1.j(new O6.a(this) { // from class: o2.a

            /* JADX INFO: renamed from: r, reason: collision with root package name */
            public final /* synthetic */ C1336b f15631r;

            {
                this.f15631r = this;
            }

            @Override // O6.a
            public final Object a() {
                C1336b c1336b = this.f15631r;
                switch (i5) {
                    case u0.f15495q /* 0 */:
                        C1111c c1111c = C1111c.f14044n;
                        return l.v(c1336b.f15637f);
                    default:
                        String strA = c1336b.f15637f.a("Content-Type");
                        if (strA != null) {
                            Pattern pattern = s.f14130d;
                            try {
                                return AbstractC0386a.m(strA);
                            } catch (IllegalArgumentException unused) {
                            }
                        }
                        return null;
                }
            }
        });
        this.f15634c = c3.f14007A;
        this.f15635d = c3.f14008B;
        this.f15636e = c3.f14014u != null;
        this.f15637f = c3.f14015v;
    }
}
