package o;

import android.R;
import android.content.ComponentName;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.os.Build;
import android.os.Bundle;
import android.util.DisplayMetrics;
import androidx.appcompat.app.AppCompatActivity;
import com.google.android.gms.common.api.Api;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.List;
import java.util.zip.DataFormatException;
import java.util.zip.Deflater;
import java.util.zip.DeflaterOutputStream;
import java.util.zip.Inflater;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.xC, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2887xC implements Pj0 {
    public static final float[] a = new float[91];
    public static final C0688a6 b = new C0688a6(18);
    public static final W4 c = new W4(1000);
    public static final W4 d;
    public static final W4 e;
    public static CG f;

    static {
        new W4(1007);
        d = new W4(1008);
        new W4(1002);
        e = new W4(1022);
    }

    public static final boolean A(L00 l00, L00 l002) {
        if (l00 == null) {
            return true;
        }
        if (l00 instanceof L00) {
            return !l00.a() || l00.equals(l002) || F3.c(l00.c, l002.c);
        }
        return false;
    }

    public static final void B(C2448sg c2448sg, InterfaceC0220Im interfaceC0220Im, boolean z) {
        Object obj = C2448sg.r.get(c2448sg);
        Throwable thD = c2448sg.d(obj);
        Object h20 = thD != null ? new H20(thD) : c2448sg.f(obj);
        if (!z) {
            interfaceC0220Im.resumeWith(h20);
            return;
        }
        C1428hs c1428hs = (C1428hs) interfaceC0220Im;
        AbstractC0298Lm abstractC0298Lm = c1428hs.p;
        Object obj2 = c1428hs.r;
        InterfaceC2747vn interfaceC2747vnH = abstractC0298Lm.h();
        Object objI = AbstractC1155f00.I(interfaceC2747vnH, obj2);
        Jh0 jh0G = objI != AbstractC1155f00.g ? G(abstractC0298Lm, interfaceC2747vnH, objI) : null;
        try {
            c1428hs.p.resumeWith(h20);
            if (jh0G == null || jh0G.n0()) {
                AbstractC1155f00.C(interfaceC2747vnH, objI);
            }
        } catch (Throwable th) {
            if (jh0G == null || jh0G.n0()) {
                AbstractC1155f00.C(interfaceC2747vnH, objI);
            }
            throw th;
        }
    }

    public static int C(double d2) {
        if (Double.isNaN(d2)) {
            throw new IllegalArgumentException("Cannot round NaN value.");
        }
        if (d2 > 2.147483647E9d) {
            return Api.BaseClientBuilder.API_PRIORITY_OTHER;
        }
        if (d2 < -2.147483648E9d) {
            return Integer.MIN_VALUE;
        }
        return (int) Math.round(d2);
    }

    public static int D(float f2) {
        if (Float.isNaN(f2)) {
            throw new IllegalArgumentException("Cannot round NaN value.");
        }
        return Math.round(f2);
    }

    public static long E(double d2) {
        if (Double.isNaN(d2)) {
            throw new IllegalArgumentException("Cannot round NaN value.");
        }
        return Math.round(d2);
    }

    public static int F(Context context, int i) throws Resources.NotFoundException {
        TypedArray typedArrayObtainStyledAttributes = context.obtainStyledAttributes(R.style.Animation.Activity, new int[]{i});
        int resourceId = typedArrayObtainStyledAttributes.getResourceId(0, -1);
        typedArrayObtainStyledAttributes.recycle();
        return resourceId;
    }

    public static final Jh0 G(InterfaceC0220Im interfaceC0220Im, InterfaceC2747vn interfaceC2747vn, Object obj) {
        Jh0 jh0 = null;
        if ((interfaceC0220Im instanceof InterfaceC0117En) && interfaceC2747vn.m(C2828wg.n) != null) {
            InterfaceC0117En interfaceC0117EnE = (InterfaceC0117En) interfaceC0220Im;
            while (true) {
                if ((interfaceC0117EnE instanceof C1523is) || (interfaceC0117EnE = interfaceC0117EnE.e()) == null) {
                    break;
                }
                if (interfaceC0117EnE instanceof Jh0) {
                    jh0 = (Jh0) interfaceC0117EnE;
                    break;
                }
            }
            if (jh0 != null) {
                jh0.o0(interfaceC2747vn, obj);
            }
        }
        return jh0;
    }

    public static void H(ByteArrayOutputStream byteArrayOutputStream, long j, int i) {
        byte[] bArr = new byte[i];
        for (int i2 = 0; i2 < i; i2++) {
            bArr[i2] = (byte) ((j >> (i2 * 8)) & 255);
        }
        byteArrayOutputStream.write(bArr);
    }

    public static void I(ByteArrayOutputStream byteArrayOutputStream, int i) {
        H(byteArrayOutputStream, i, 2);
    }

    public static S6 a(int i, float f2) {
        if ((i & 2) != 0) {
            f2 = 0.0f;
        }
        return new S6(AbstractC1692kh0.u, Float.valueOf(0.0f), new U6(f2), Long.MIN_VALUE, Long.MIN_VALUE, false);
    }

    /* JADX WARN: Removed duplicated region for block: B:100:0x0538  */
    /* JADX WARN: Removed duplicated region for block: B:104:0x0544  */
    /* JADX WARN: Removed duplicated region for block: B:108:0x0589  */
    /* JADX WARN: Removed duplicated region for block: B:110:0x0591  */
    /* JADX WARN: Removed duplicated region for block: B:113:0x05a1  */
    /* JADX WARN: Removed duplicated region for block: B:115:0x05af  */
    /* JADX WARN: Removed duplicated region for block: B:120:0x05c8  */
    /* JADX WARN: Removed duplicated region for block: B:121:0x05cb  */
    /* JADX WARN: Removed duplicated region for block: B:124:0x0644  */
    /* JADX WARN: Removed duplicated region for block: B:127:0x0649  */
    /* JADX WARN: Removed duplicated region for block: B:131:0x06cc  */
    /* JADX WARN: Removed duplicated region for block: B:49:0x01da  */
    /* JADX WARN: Removed duplicated region for block: B:50:0x01de  */
    /* JADX WARN: Removed duplicated region for block: B:55:0x01f9  */
    /* JADX WARN: Removed duplicated region for block: B:58:0x0294  */
    /* JADX WARN: Removed duplicated region for block: B:60:0x029c  */
    /* JADX WARN: Removed duplicated region for block: B:65:0x02bc  */
    /* JADX WARN: Removed duplicated region for block: B:71:0x02df  */
    /* JADX WARN: Removed duplicated region for block: B:72:0x02ed  */
    /* JADX WARN: Removed duplicated region for block: B:75:0x03d1  */
    /* JADX WARN: Removed duplicated region for block: B:77:0x03d9  */
    /* JADX WARN: Removed duplicated region for block: B:82:0x03f9  */
    /* JADX WARN: Removed duplicated region for block: B:88:0x0444  */
    /* JADX WARN: Removed duplicated region for block: B:89:0x0447  */
    /* JADX WARN: Removed duplicated region for block: B:93:0x046a  */
    /* JADX WARN: Removed duplicated region for block: B:96:0x0482  */
    /* JADX WARN: Removed duplicated region for block: B:97:0x0494  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public static final void b(o.SC r86, o.C0321Mk r87, int r88) {
        /*
            Method dump skipped, instructions count: 1805
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C2887xC.b(o.SC, o.Mk, int):void");
    }

    public static final void c(boolean z, NC nc, C0321Mk c0321Mk, int i) {
        NC nc2;
        C0321Mk c0321Mk2;
        c0321Mk.X(800972707);
        if ((((c0321Mk.g(z) ? 4 : 2) | i) & 19) == 18 && c0321Mk.z()) {
            c0321Mk.Q();
            nc2 = nc;
            c0321Mk2 = c0321Mk;
        } else {
            nc2 = nc;
            c0321Mk2 = c0321Mk;
            As0.a(nc2, null, y(35080314, new C1112ee(z), c0321Mk), c0321Mk2, 390, 2);
        }
        L00 l00S = c0321Mk2.s();
        if (l00S != null) {
            l00S.d = new C0652Zd(z, nc2, i);
        }
    }

    public static C2493t4 d(int i, int i2, int i3) {
        Bitmap bitmapCreateBitmap;
        R20 r20 = C0423Qi.e;
        Bitmap.Config configM = C1884mi0.M(i3);
        if (Build.VERSION.SDK_INT >= 26) {
            bitmapCreateBitmap = Bitmap.createBitmap((DisplayMetrics) null, i, i2, C1884mi0.M(i3), true, AbstractC1456i7.a(r20));
        } else {
            bitmapCreateBitmap = Bitmap.createBitmap((DisplayMetrics) null, i, i2, configM);
            bitmapCreateBitmap.setHasAlpha(true);
        }
        return new C2493t4(bitmapCreateBitmap);
    }

    public static final void e(C0321Mk c0321Mk, MP mp) {
        C1162f4 c1162f4 = C1162f4.j;
        int iHashCode = Long.hashCode(c0321Mk.R);
        MP mpF = AbstractC1692kh0.F(c0321Mk, mp);
        AW awL = c0321Mk.l();
        InterfaceC0062Ck.b.getClass();
        C0744al c0744al = C0036Bk.b;
        C70 c70 = c0321Mk.a;
        c0321Mk.Y();
        if (c0321Mk.Q) {
            c0321Mk.k(c0744al);
        } else {
            c0321Mk.i0();
        }
        AbstractC2378rs0.f0(c1162f4, c0321Mk, C0036Bk.f);
        AbstractC2378rs0.f0(awL, c0321Mk, C0036Bk.e);
        AbstractC2378rs0.f0(mpF, c0321Mk, C0036Bk.c);
        C0975d6 c0975d6 = C0036Bk.i;
        if (c0321Mk.Q || !F3.c(c0321Mk.K(), Integer.valueOf(iHashCode))) {
            AbstractC2462sn.r(iHashCode, c0321Mk, iHashCode, c0975d6);
        }
        c0321Mk.q(true);
    }

    public static final void f(C1303gd0 c1303gd0, Context context, final boolean z, final String str, final long j) {
        if (Ue0.c(j) || str.length() == 0) {
            return;
        }
        PackageManager packageManager = context.getPackageManager();
        final Context context2 = context;
        List list = (List) YT.e.g(context2);
        if (list.isEmpty()) {
            return;
        }
        UQ uq = c1303gd0.a;
        UQ uq2 = c1303gd0.a;
        C2443sd0 c2443sd0 = C2443sd0.b;
        uq.a(c2443sd0);
        int size = list.size();
        int i = 0;
        while (i < size) {
            final ResolveInfo resolveInfo = (ResolveInfo) list.get(i);
            uq2.a(new C2064od0(new UY(i), resolveInfo.loadLabel(packageManager).toString(), 0, new OC() { // from class: o.VY
                @Override // o.OC
                public final Object g(Object obj) {
                    YT.f.i(context2, resolveInfo, Boolean.valueOf(z), str, new Ue0(j));
                    ((InterfaceC2538td0) obj).close();
                    return Oh0.a;
                }
            }));
            i++;
            context2 = context;
        }
        uq2.a(c2443sd0);
    }

    public static float g(float[] fArr) {
        if (fArr.length < 6) {
            return 0.0f;
        }
        float f2 = fArr[0];
        float f3 = fArr[1];
        float f4 = fArr[2];
        float f5 = fArr[3];
        float f6 = fArr[4];
        float f7 = fArr[5];
        float f8 = (((((f4 * f7) + ((f3 * f6) + (f2 * f5))) - (f5 * f6)) - (f3 * f4)) - (f2 * f7)) * 0.5f;
        return f8 < 0.0f ? -f8 : f8;
    }

    public static final int h(int i, int i2) {
        return i << (((i2 % 10) * 3) + 1);
    }

    public static C0058Cg i(long j, C0321Mk c0321Mk, int i) {
        long j2;
        long jB = AbstractC0319Mi.b(j, c0321Mk);
        long j3 = C0190Hi.g;
        long jB2 = C0190Hi.b(0.38f, jB);
        C0294Li c0294Li = (C0294Li) c0321Mk.j(AbstractC0319Mi.a);
        C0058Cg c0058Cg = c0294Li.Z;
        if (c0058Cg == null) {
            float f2 = AbstractC2482sy.a;
            j2 = jB;
            C0058Cg c0058Cg2 = new C0058Cg(AbstractC0319Mi.c(c0294Li, 39), AbstractC0319Mi.a(c0294Li, AbstractC0319Mi.c(c0294Li, 39)), AbstractC0752ap.y(C0190Hi.b(AbstractC2482sy.d, AbstractC0319Mi.c(c0294Li, AbstractC2482sy.b)), AbstractC0319Mi.c(c0294Li, 39)), C0190Hi.b(0.38f, AbstractC0319Mi.a(c0294Li, AbstractC0319Mi.c(c0294Li, 39))));
            c0294Li.Z = c0058Cg2;
            c0058Cg = c0058Cg2;
        } else {
            j2 = jB;
        }
        long j4 = j != 16 ? j : c0058Cg.a;
        long j5 = j2 != 16 ? j2 : c0058Cg.b;
        if (j3 == 16) {
            j3 = c0058Cg.c;
        }
        long j6 = j3;
        if (jB2 == 16) {
            jB2 = c0058Cg.d;
        }
        return new C0058Cg(j4, j5, j6, jB2);
    }

    public static C0084Dg j(int i, float f2) {
        if ((i & 1) != 0) {
            f2 = AbstractC2482sy.a;
        }
        return new C0084Dg(f2, AbstractC2482sy.h, AbstractC2482sy.f, AbstractC2482sy.g, AbstractC2482sy.e, AbstractC2482sy.c);
    }

    public static final int k(float f2) {
        return Math.round((float) Math.ceil(f2));
    }

    public static byte[] l(byte[] bArr) {
        Deflater deflater = new Deflater(1);
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        try {
            DeflaterOutputStream deflaterOutputStream = new DeflaterOutputStream(byteArrayOutputStream, deflater);
            try {
                deflaterOutputStream.write(bArr);
                deflaterOutputStream.close();
                deflater.end();
                return byteArrayOutputStream.toByteArray();
            } finally {
            }
        } catch (Throwable th) {
            deflater.end();
            throw th;
        }
    }

    public static AbstractC0934ck0 m(Class cls) throws NoSuchMethodException, SecurityException {
        try {
            Constructor declaredConstructor = cls.getDeclaredConstructor(null);
            if (!Modifier.isPublic(declaredConstructor.getModifiers())) {
                throw new RuntimeException("Cannot create an instance of " + cls);
            }
            try {
                return (AbstractC0934ck0) declaredConstructor.newInstance(null);
            } catch (IllegalAccessException e2) {
                throw new RuntimeException("Cannot create an instance of " + cls, e2);
            } catch (InstantiationException e3) {
                throw new RuntimeException("Cannot create an instance of " + cls, e3);
            }
        } catch (NoSuchMethodException e4) {
            throw new RuntimeException("Cannot create an instance of " + cls, e4);
        }
    }

    public static final InterfaceC2747vn n(InterfaceC2747vn interfaceC2747vn, InterfaceC2747vn interfaceC2747vn2, boolean z) {
        Boolean bool = Boolean.FALSE;
        boolean zBooleanValue = ((Boolean) interfaceC2747vn.R(bool, new X8(2))).booleanValue();
        boolean zBooleanValue2 = ((Boolean) interfaceC2747vn2.R(bool, new X8(2))).booleanValue();
        if (!zBooleanValue && !zBooleanValue2) {
            return interfaceC2747vn.M(interfaceC2747vn2);
        }
        X8 x8 = new X8(3);
        C0281Kv c0281Kv = C0281Kv.l;
        InterfaceC2747vn interfaceC2747vn3 = (InterfaceC2747vn) interfaceC2747vn.R(c0281Kv, x8);
        Object objR = interfaceC2747vn2;
        if (zBooleanValue2) {
            objR = interfaceC2747vn2.R(c0281Kv, new X8(4));
        }
        return interfaceC2747vn3.M((InterfaceC2747vn) objR);
    }

    public static final C2366rm0 o(Dm0 dm0) {
        return new C2366rm0(dm0.a, dm0.t);
    }

    public static Intent p(AppCompatActivity appCompatActivity) {
        Intent parentActivityIntent = appCompatActivity.getParentActivityIntent();
        if (parentActivityIntent != null) {
            return parentActivityIntent;
        }
        try {
            String strR = r(appCompatActivity, appCompatActivity.getComponentName());
            if (strR == null) {
                return null;
            }
            ComponentName componentName = new ComponentName(appCompatActivity, strR);
            try {
                return r(appCompatActivity, componentName) == null ? Intent.makeMainActivity(componentName) : new Intent().setComponent(componentName);
            } catch (PackageManager.NameNotFoundException unused) {
                return null;
            }
        } catch (PackageManager.NameNotFoundException e2) {
            throw new IllegalArgumentException(e2);
        }
    }

    public static Intent q(AppCompatActivity appCompatActivity, ComponentName componentName) {
        String strR = r(appCompatActivity, componentName);
        if (strR == null) {
            return null;
        }
        ComponentName componentName2 = new ComponentName(componentName.getPackageName(), strR);
        return r(appCompatActivity, componentName2) == null ? Intent.makeMainActivity(componentName2) : new Intent().setComponent(componentName2);
    }

    public static String r(Context context, ComponentName componentName) {
        String string;
        ActivityInfo activityInfo = context.getPackageManager().getActivityInfo(componentName, Build.VERSION.SDK_INT >= 29 ? 269222528 : 787072);
        String str = activityInfo.parentActivityName;
        if (str != null) {
            return str;
        }
        Bundle bundle = activityInfo.metaData;
        if (bundle == null || (string = bundle.getString("android.support.PARENT_ACTIVITY")) == null) {
            return null;
        }
        if (string.charAt(0) != '.') {
            return string;
        }
        return context.getPackageName() + string;
    }

    public static final AbstractC0709aN s(AbstractC0709aN abstractC0709aN) {
        C2420sK c2420sK = abstractC0709aN.z.z;
        while (true) {
            C2420sK c2420sKS = c2420sK.s();
            C2420sK c2420sK2 = null;
            if ((c2420sKS != null ? c2420sKS.r : null) == null) {
                return ((AbstractC2239qS) c2420sK.N.e).N0();
            }
            C2420sK c2420sKS2 = c2420sK.s();
            if (c2420sKS2 != null) {
                c2420sK2 = c2420sKS2.r;
            }
            c2420sK2.getClass();
            c2420sK = c2420sK.s().r;
        }
    }

    public static final void t(P50 p50) {
        AbstractC2539te.S(p50).E();
    }

    public static final InterfaceC2747vn u(InterfaceC0065Cn interfaceC0065Cn, InterfaceC2747vn interfaceC2747vn) {
        InterfaceC2747vn interfaceC2747vnN = n(interfaceC0065Cn.i(), interfaceC2747vn, true);
        C2468sq c2468sq = AbstractC1903ms.a;
        return (interfaceC2747vnN == c2468sq || interfaceC2747vnN.m(C0669Zu.D) != null) ? interfaceC2747vnN : interfaceC2747vnN.M(c2468sq);
    }

    public static byte[] v(InputStream inputStream, int i) throws IOException {
        byte[] bArr = new byte[i];
        int i2 = 0;
        while (i2 < i) {
            int i3 = inputStream.read(bArr, i2, i - i2);
            if (i3 < 0) {
                throw new IllegalStateException(AbstractC0126Ew.j(i, "Not enough bytes to read: "));
            }
            i2 += i3;
        }
        return bArr;
    }

    public static byte[] w(FileInputStream fileInputStream, int i, int i2) {
        Inflater inflater = new Inflater();
        try {
            byte[] bArr = new byte[i2];
            byte[] bArr2 = new byte[2048];
            int i3 = 0;
            int iInflate = 0;
            while (!inflater.finished() && !inflater.needsDictionary() && i3 < i) {
                int i4 = fileInputStream.read(bArr2);
                if (i4 < 0) {
                    throw new IllegalStateException("Invalid zip data. Stream ended after $totalBytesRead bytes. Expected " + i + " bytes");
                }
                inflater.setInput(bArr2, 0, i4);
                try {
                    iInflate += inflater.inflate(bArr, iInflate, i2 - iInflate);
                    i3 += i4;
                } catch (DataFormatException e2) {
                    throw new IllegalStateException(e2.getMessage());
                }
            }
            if (i3 == i) {
                if (inflater.finished()) {
                    return bArr;
                }
                throw new IllegalStateException("Inflater did not finish");
            }
            throw new IllegalStateException("Didn't read enough bytes during decompression. expected=" + i + " actual=" + i3);
        } finally {
            inflater.end();
        }
    }

    public static long x(InputStream inputStream, int i) {
        byte[] bArrV = v(inputStream, i);
        long j = 0;
        for (int i2 = 0; i2 < i; i2++) {
            j += (bArrV[i2] & 255) << (i2 * 8);
        }
        return j;
    }

    public static final C0554Vj y(int i, QC qc, C0321Mk c0321Mk) {
        Object objK = c0321Mk.K();
        if (objK == C0140Fk.a) {
            objK = new C0554Vj(i, true, qc);
            c0321Mk.f0(objK);
        }
        C0554Vj c0554Vj = (C0554Vj) objK;
        if (!F3.c(c0554Vj.n, qc)) {
            boolean z = c0554Vj.n == null;
            c0554Vj.n = qc;
            if (!z && c0554Vj.m) {
                L00 l00 = c0554Vj.f384o;
                if (l00 != null) {
                    C0555Vk c0555Vk = l00.a;
                    if (c0555Vk != null) {
                        c0555Vk.n(l00, null);
                    }
                    c0554Vj.f384o = null;
                }
                ArrayList arrayList = c0554Vj.p;
                if (arrayList != null) {
                    int size = arrayList.size();
                    for (int i2 = 0; i2 < size; i2++) {
                        L00 l002 = (L00) arrayList.get(i2);
                        C0555Vk c0555Vk2 = l002.a;
                        if (c0555Vk2 != null) {
                            c0555Vk2.n(l002, null);
                        }
                    }
                    arrayList.clear();
                }
            }
        }
        return c0554Vj;
    }

    public static final C2328rN z(AbstractC2772w1 abstractC2772w1, OC oc, C0321Mk c0321Mk, int i) {
        Object obj;
        AbstractC0752ap.Z(abstractC2772w1, c0321Mk);
        Object objZ = AbstractC0752ap.Z(oc, c0321Mk);
        Object[] objArr = new Object[0];
        Object objK = c0321Mk.K();
        Object obj2 = C0140Fk.a;
        if (objK == obj2) {
            objK = new K0(7);
            c0321Mk.f0(objK);
        }
        Object obj3 = (String) AbstractC0662Zn.C(objArr, (NC) objK, c0321Mk);
        I1 i1 = (I1) c0321Mk.j(AbstractC1568jM.a);
        if (i1 == null) {
            c0321Mk.V(1213380307);
            Object baseContext = (Context) c0321Mk.j(N3.b);
            while (true) {
                if (!(baseContext instanceof ContextWrapper)) {
                    baseContext = null;
                    break;
                }
                if (baseContext instanceof I1) {
                    break;
                }
                baseContext = ((ContextWrapper) baseContext).getBaseContext();
            }
            i1 = (I1) baseContext;
        } else {
            c0321Mk.V(1213379439);
        }
        c0321Mk.q(false);
        if (i1 == null) {
            throw new IllegalStateException("No ActivityResultRegistryOwner was provided via LocalActivityResultRegistryOwner");
        }
        Object activityResultRegistry = i1.getActivityResultRegistry();
        Object objK2 = c0321Mk.K();
        if (objK2 == obj2) {
            objK2 = new C3057z1();
            c0321Mk.f0(objK2);
        }
        C3057z1 c3057z1 = (C3057z1) objK2;
        Object objK3 = c0321Mk.K();
        if (objK3 == obj2) {
            objK3 = new C2328rN(c3057z1);
            c0321Mk.f0(objK3);
        }
        C2328rN c2328rN = (C2328rN) objK3;
        boolean zH = c0321Mk.h(c3057z1) | c0321Mk.h(activityResultRegistry) | c0321Mk.f(obj3) | c0321Mk.h(abstractC2772w1) | c0321Mk.f(objZ);
        Object objK4 = c0321Mk.K();
        if (zH || objK4 == obj2) {
            obj = abstractC2772w1;
            objK4 = new F1(c3057z1, activityResultRegistry, obj3, obj, objZ, 0);
            c0321Mk.f0(objK4);
        } else {
            obj = abstractC2772w1;
        }
        OC oc2 = (OC) objK4;
        boolean zF = c0321Mk.f(activityResultRegistry) | c0321Mk.f(obj3) | c0321Mk.f(obj);
        Object objK5 = c0321Mk.K();
        if (zF || objK5 == obj2) {
            objK5 = new C2188ps(oc2);
            c0321Mk.f0(objK5);
        }
        return c2328rN;
    }
}
