package y5;

import Z6.InterfaceC0382w;
import c7.K;
import com.google.android.gms.internal.measurement.C1;
import com.martsnew.tv.R;
import f4.C0922b;
import java.util.concurrent.CancellationException;

/* JADX INFO: renamed from: y5.j, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C1765j extends G6.i implements O6.p {

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public int f18999u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public /* synthetic */ Object f19000v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public final /* synthetic */ boolean f19001w;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public final /* synthetic */ k f19002x;

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public final /* synthetic */ G6.i f19003y;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    /* JADX WARN: Multi-variable type inference failed */
    public C1765j(boolean z8, k kVar, O6.p pVar, E6.d dVar) {
        super(2, dVar);
        this.f19001w = z8;
        this.f19002x = kVar;
        this.f19003y = (G6.i) pVar;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) {
        return ((C1765j) m((E6.d) obj2, (InterfaceC0382w) obj)).p(A6.n.f457a);
    }

    /* JADX WARN: Type inference failed for: r1v0, types: [G6.i, O6.p] */
    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        C1765j c1765j = new C1765j(this.f19001w, this.f19002x, this.f19003y, dVar);
        c1765j.f19000v = obj;
        return c1765j;
    }

    /* JADX WARN: Code restructure failed: missing block: B:17:0x003e, code lost:
    
        if (r1.k(r9, r8) == r0) goto L23;
     */
    /* JADX WARN: Code restructure failed: missing block: B:22:0x005a, code lost:
    
        if (r6.g(r9, r8) == r0) goto L23;
     */
    /* JADX WARN: Code restructure failed: missing block: B:23:0x005c, code lost:
    
        return r0;
     */
    /* JADX WARN: Removed duplicated region for block: B:25:0x005f  */
    /* JADX WARN: Type inference failed for: r1v4, types: [G6.i, O6.p] */
    @Override // G6.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object p(Object obj) throws Exception {
        F6.a aVar = F6.a.f2580q;
        int i = this.f18999u;
        boolean z8 = this.f19001w;
        k kVar = this.f19002x;
        try {
        } catch (Exception e8) {
            if (e8 instanceof CancellationException) {
                throw e8;
            }
            C0922b.a().b(e8);
            n nVar = new n(R.string.msg_unknown_error);
            this.f18999u = 2;
        }
        if (i == 0) {
            C1.N(obj);
            InterfaceC0382w interfaceC0382w = (InterfaceC0382w) this.f19000v;
            if (z8) {
                K k8 = kVar.f19005c;
                Boolean bool = Boolean.TRUE;
                k8.getClass();
                k8.g(null, bool);
            }
            ?? r12 = this.f19003y;
            this.f18999u = 1;
        } else {
            if (i != 1) {
                if (i != 2) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                C1.N(obj);
                if (z8) {
                    K k9 = kVar.f19005c;
                    Boolean bool2 = Boolean.FALSE;
                    k9.getClass();
                    k9.g(null, bool2);
                }
                return A6.n.f457a;
            }
            C1.N(obj);
        }
        if (z8) {
        }
        return A6.n.f457a;
    }
}
