package p000.p001.p021.p022;

import p000.p001.p021.p022.C1240;
import p025.p026.p029.InterfaceC1406;
import p025.p026.p029.InterfaceC1410;
import p025.p026.p029.InterfaceC1416;
import p138.p176.p177.p242.p246.p251.C4303;
import p402.C6549;
import p402.p405.InterfaceC6575;
import p402.p405.p406.EnumC6586;
import p402.p405.p407.p408.AbstractC6597;
import p402.p405.p407.p408.InterfaceC6593;
import p402.p411.p412.InterfaceC6618;
import p402.p411.p413.C6635;

/* JADX INFO: Add missing generic type declarations: [T] */
/* JADX INFO: renamed from: ނ.֏.ؠ.֏.ފ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
@InterfaceC6593(c = "ar.tvplayer.core.util.DistinctLiveData$1$actor$2$1", f = "DistinctLiveData.kt", l = {58}, m = "invokeSuspend")
public final class C1239<T> extends AbstractC6597 implements InterfaceC6618<InterfaceC1406<T>, InterfaceC6575<? super C6549>, Object> {

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public InterfaceC1406 f4338;

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public Object f4339;

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public Object f4340;

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public Object f4341;

    /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
    public Object f4342;

    /* JADX INFO: renamed from: ތ, reason: contains not printable characters */
    public Object f4343;

    /* JADX INFO: renamed from: ލ, reason: contains not printable characters */
    public Object f4344;

    /* JADX INFO: renamed from: ގ, reason: contains not printable characters */
    public Object f4345;

    /* JADX INFO: renamed from: ޏ, reason: contains not printable characters */
    public int f4346;

    /* JADX INFO: renamed from: ސ, reason: contains not printable characters */
    public final /* synthetic */ C1240.C1241.C1242 f4347;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C1239(C1240.C1241.C1242 c1242, InterfaceC6575 interfaceC6575) {
        super(2, interfaceC6575);
        this.f4347 = c1242;
    }

    @Override // p402.p405.p407.p408.AbstractC6589
    /* JADX INFO: renamed from: ֏ */
    public final InterfaceC6575<C6549> mo837(Object obj, InterfaceC6575<?> interfaceC6575) {
        if (interfaceC6575 == null) {
            C6635.m9824("completion");
            throw null;
        }
        C1239 c1239 = new C1239(this.f4347, interfaceC6575);
        c1239.f4338 = (InterfaceC1406) obj;
        return c1239;
    }

    @Override // p402.p411.p412.InterfaceC6618
    /* JADX INFO: renamed from: ؠ */
    public final Object mo838(Object obj, InterfaceC6575<? super C6549> interfaceC6575) {
        return ((C1239) mo837(obj, interfaceC6575)).mo839(C6549.f19328);
    }

    /* JADX WARN: Removed duplicated region for block: B:14:0x0065 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:15:0x0066  */
    /* JADX WARN: Removed duplicated region for block: B:18:0x0079 A[Catch: all -> 0x00a9, TryCatch #0 {all -> 0x00a9, blocks: (B:16:0x0071, B:18:0x0079, B:20:0x008a), top: B:31:0x0071 }] */
    /* JADX WARN: Removed duplicated region for block: B:22:0x00a3  */
    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$UnknownArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:15:0x0066 -> B:31:0x0071). Please report as a decompilation issue!!! */
    @Override // p402.p405.p407.p408.AbstractC6589
    /* JADX INFO: renamed from: ށ */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object mo839(Object obj) {
        InterfaceC1416 interfaceC1416M2746;
        C1239<T> c1239;
        InterfaceC1406 interfaceC1406;
        Throwable th;
        InterfaceC1410 it;
        InterfaceC1416 interfaceC1416;
        InterfaceC1416 interfaceC14162;
        C1239<T> c12392;
        Object objMo2737;
        EnumC6586 enumC6586 = EnumC6586.COROUTINE_SUSPENDED;
        int i = this.f4346;
        try {
            if (i == 0) {
                C4303.m7198(obj);
                InterfaceC1406 interfaceC14062 = this.f4338;
                interfaceC1416M2746 = interfaceC14062.m2746();
                c1239 = this;
                interfaceC1406 = interfaceC14062;
                th = null;
                it = interfaceC1416M2746.iterator();
                interfaceC1416 = interfaceC1416M2746;
                interfaceC14162 = interfaceC1416;
                c12392 = c1239;
                c12392.f4339 = interfaceC1406;
                c12392.f4340 = interfaceC14162;
                c12392.f4341 = c1239;
                c12392.f4342 = interfaceC1416M2746;
                c12392.f4343 = th;
                c12392.f4344 = interfaceC1416;
                c12392.f4345 = it;
                c12392.f4346 = 1;
                objMo2737 = it.mo2737(c1239);
                if (objMo2737 != enumC6586) {
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                InterfaceC1410 interfaceC1410 = (InterfaceC1410) this.f4345;
                InterfaceC1416 interfaceC14163 = (InterfaceC1416) this.f4344;
                Throwable th2 = (Throwable) this.f4343;
                InterfaceC1416 interfaceC14164 = (InterfaceC1416) this.f4342;
                C1239<T> c12393 = (C1239) this.f4341;
                InterfaceC1416 interfaceC14165 = (InterfaceC1416) this.f4340;
                InterfaceC1406 interfaceC14063 = (InterfaceC1406) this.f4339;
                C4303.m7198(obj);
                InterfaceC1406 interfaceC14064 = interfaceC14063;
                InterfaceC1416 interfaceC14166 = interfaceC14165;
                C1239<T> c12394 = c12393;
                InterfaceC1416 interfaceC14167 = interfaceC14164;
                Throwable th3 = th2;
                InterfaceC1416 interfaceC14168 = interfaceC14163;
                InterfaceC1410 interfaceC14102 = interfaceC1410;
                EnumC6586 enumC65862 = enumC6586;
                C1239<T> c12395 = this;
                try {
                    if (!((Boolean) obj).booleanValue()) {
                        T t = (T) interfaceC14102.next();
                        if (!C6635.m9825(C1240.C1241.this.f4350, t)) {
                            C1240.C1241.this.f4350 = t;
                            C1240.this.mo341(t);
                        }
                        c12392 = c12395;
                        enumC6586 = enumC65862;
                        it = interfaceC14102;
                        interfaceC1416 = interfaceC14168;
                        th = th3;
                        interfaceC1416M2746 = interfaceC14167;
                        c1239 = c12394;
                        interfaceC14162 = interfaceC14166;
                        interfaceC1406 = interfaceC14064;
                        c12392.f4339 = interfaceC1406;
                        c12392.f4340 = interfaceC14162;
                        c12392.f4341 = c1239;
                        c12392.f4342 = interfaceC1416M2746;
                        c12392.f4343 = th;
                        c12392.f4344 = interfaceC1416;
                        c12392.f4345 = it;
                        c12392.f4346 = 1;
                        objMo2737 = it.mo2737(c1239);
                        if (objMo2737 != enumC6586) {
                            return enumC6586;
                        }
                        EnumC6586 enumC65863 = enumC6586;
                        c12395 = c12392;
                        obj = objMo2737;
                        interfaceC14064 = interfaceC1406;
                        interfaceC14166 = interfaceC14162;
                        c12394 = c1239;
                        interfaceC14167 = interfaceC1416M2746;
                        th3 = th;
                        interfaceC14168 = interfaceC1416;
                        interfaceC14102 = it;
                        enumC65862 = enumC65863;
                        if (!((Boolean) obj).booleanValue()) {
                            C4303.m7099((InterfaceC1416<?>) interfaceC14167, th3);
                            return C6549.f19328;
                        }
                    }
                } catch (Throwable th4) {
                    th = th4;
                    interfaceC1416M2746 = interfaceC14167;
                    try {
                        throw th;
                    } catch (Throwable th5) {
                        C4303.m7099((InterfaceC1416<?>) interfaceC1416M2746, th);
                        throw th5;
                    }
                }
            }
        } catch (Throwable th6) {
            th = th6;
        }
    }
}
