package A5;

import Q4.C0274v;
import Q4.K;
import W.C0336c;
import W.L;
import W.N;
import W.V;
import W.W;
import W.r;
import android.widget.Toast;
import b7.t;
import b7.u;
import c7.C0601i;
import c7.InterfaceC0597e;
import com.google.android.gms.internal.measurement.C1;
import com.martsnew.tv.R;
import com.martsnew.tv.ui.login.code.TvCodeLoginFragment;
import com.martsnew.tv.ui.login.email.TvLoginFragment;
import d7.C0850a;
import n4.u0;
import y5.m;
import y5.n;
import y5.o;
import y5.v;

/* JADX INFO: loaded from: classes.dex */
public final class c implements InterfaceC0597e {

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final /* synthetic */ int f421q;

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

    public /* synthetic */ c(int i, Object obj) {
        this.f421q = i;
        this.f422r = obj;
    }

    /* JADX WARN: Removed duplicated region for block: B:11:0x0024  */
    /* JADX WARN: Removed duplicated region for block: B:37:0x008b  */
    @Override // c7.InterfaceC0597e
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object l(Object obj, E6.d dVar) throws Throwable {
        r rVar;
        Object objF;
        C0601i c0601i;
        switch (this.f421q) {
            case u0.f15495q /* 0 */:
                if (((Boolean) obj).booleanValue()) {
                    n nVar = new n(R.string.message_change_password_successful);
                    i iVar = (i) this.f422r;
                    iVar.o0(nVar);
                    v.q0(iVar);
                }
                return A6.n.f457a;
            case 1:
                o oVar = (o) obj;
                boolean z8 = oVar instanceof m;
                TvCodeLoginFragment tvCodeLoginFragment = (TvCodeLoginFragment) this.f422r;
                if (z8) {
                    Toast.makeText(tvCodeLoginFragment.m(), ((m) oVar).f19017a, 0).show();
                } else {
                    if (!(oVar instanceof n)) {
                        throw new A6.b();
                    }
                    Toast.makeText(tvCodeLoginFragment.m(), tvCodeLoginFragment.t(((n) oVar).f19018a), 0).show();
                }
                return A6.n.f457a;
            case 2:
                o oVar2 = (o) obj;
                boolean z9 = oVar2 instanceof m;
                TvLoginFragment tvLoginFragment = (TvLoginFragment) this.f422r;
                if (z9) {
                    Toast.makeText(tvLoginFragment.m(), ((m) oVar2).f19017a, 0).show();
                } else {
                    if (!(oVar2 instanceof n)) {
                        throw new A6.b();
                    }
                    Toast.makeText(tvLoginFragment.m(), tvLoginFragment.t(((n) oVar2).f19018a), 0).show();
                }
                return A6.n.f457a;
            case 3:
                ((K) this.f422r).f5670c.set((C0274v) obj);
                return A6.n.f457a;
            case 4:
                if (dVar instanceof r) {
                    rVar = (r) dVar;
                    int i = rVar.f7030u;
                    if ((i & Integer.MIN_VALUE) != 0) {
                        rVar.f7030u = i - Integer.MIN_VALUE;
                    } else {
                        rVar = new r(this, dVar);
                    }
                }
                Object obj2 = rVar.f7029t;
                F6.a aVar = F6.a.f2580q;
                int i5 = rVar.f7030u;
                if (i5 == 0) {
                    C1.N(obj2);
                    V v7 = (V) obj;
                    if (v7 instanceof N) {
                        throw ((N) v7).f6951b;
                    }
                    if (!(v7 instanceof C0336c)) {
                        if (v7 instanceof L ? true : v7 instanceof W) {
                            throw new IllegalStateException("This is a bug in DataStore. Please file a bug at: https://issuetracker.google.com/issues/new?component=907884&template=1466542");
                        }
                        throw new A6.b();
                    }
                    Object obj3 = ((C0336c) v7).f6978b;
                    rVar.f7030u = 1;
                    if (((InterfaceC0597e) this.f422r).l(obj3, rVar) == aVar) {
                        return aVar;
                    }
                } else {
                    if (i5 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    C1.N(obj2);
                }
                return A6.n.f457a;
            case 5:
                W.K k8 = (W.K) this.f422r;
                boolean z10 = k8.f6942h.a() instanceof L;
                A6.n nVar2 = A6.n.f457a;
                return (z10 || (objF = W.K.f(k8, true, dVar)) != F6.a.f2580q) ? nVar2 : objF;
            case Z.g.STRING_SET_FIELD_NUMBER /* 6 */:
                if (dVar instanceof C0601i) {
                    c0601i = (C0601i) dVar;
                    int i8 = c0601i.f9431v;
                    if ((i8 & Integer.MIN_VALUE) != 0) {
                        c0601i.f9431v = i8 - Integer.MIN_VALUE;
                    } else {
                        c0601i = new C0601i(this, dVar);
                    }
                }
                Object obj4 = c0601i.f9429t;
                F6.a aVar2 = F6.a.f2580q;
                int i9 = c0601i.f9431v;
                if (i9 == 0) {
                    C1.N(obj4);
                    if (obj == null) {
                        obj = d7.c.f12346b;
                    }
                    c0601i.f9431v = 1;
                    if (((t) ((u) this.f422r)).f9273t.k(c0601i, obj) == aVar2) {
                        return aVar2;
                    }
                } else {
                    if (i9 != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    C1.N(obj4);
                }
                return A6.n.f457a;
            default:
                ((P6.m) this.f422r).f5535q = obj;
                throw new C0850a(this);
        }
    }
}
