package M5;

import Z6.InterfaceC0382w;
import c7.K;
import com.google.android.gms.internal.measurement.C1;
import com.martsnew.domain.model.Movie;
import y5.C1763h;

/* JADX INFO: loaded from: classes.dex */
public final class w extends G6.i implements O6.p {

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

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public w(boolean z8, x xVar, Movie movie, E6.d dVar) {
        super(2, dVar);
        this.f4339v = z8;
        this.f4340w = xVar;
        this.f4341x = movie;
    }

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

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        return new w(this.f4339v, this.f4340w, this.f4341x, dVar);
    }

    /* JADX WARN: Code restructure failed: missing block: B:13:0x003c, code lost:
    
        if (r9 == r0) goto L23;
     */
    /* JADX WARN: Code restructure failed: missing block: B:22:0x006b, code lost:
    
        if (r9 == r0) goto L23;
     */
    @Override // G6.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object p(Object obj) throws Throwable {
        Object objA;
        Object objA2;
        Object obj2 = F6.a.f2580q;
        int i = this.f4338u;
        x xVar = this.f4340w;
        K k8 = xVar.f4350m;
        K k9 = xVar.f4349l;
        if (i == 0) {
            C1.N(obj);
            Movie movie = this.f4341x;
            if (this.f4339v) {
                this.f4338u = 1;
                objA2 = xVar.i.a(movie, this);
            } else {
                this.f4338u = 2;
                objA = xVar.f4347j.a(movie, this);
            }
            return obj2;
        }
        if (i == 1) {
            C1.N(obj);
            objA2 = ((A6.j) obj).f449q;
            if (!(objA2 instanceof A6.i)) {
                ((Boolean) objA2).getClass();
                Movie movie2 = (Movie) k9.e();
                if (movie2 != null) {
                    movie2.f11065L = true;
                }
                C1763h c1763h = new C1763h(new p(true));
                k8.getClass();
                k8.g(null, c1763h);
            }
        } else {
            if (i != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            C1.N(obj);
            objA = ((A6.j) obj).f449q;
            if (!(objA instanceof A6.i)) {
                ((Boolean) objA).getClass();
                Movie movie3 = (Movie) k9.e();
                if (movie3 != null) {
                    movie3.f11065L = false;
                }
                C1763h c1763h2 = new C1763h(new p(false));
                k8.getClass();
                k8.g(null, c1763h2);
            }
        }
        return A6.n.f457a;
    }
}
