package D5;

import B6.y;
import Z6.InterfaceC0382w;
import c7.K;
import com.google.android.gms.internal.measurement.C1;
import com.martsnew.domain.model.Movie;
import java.util.List;

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

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

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public q(s sVar, Movie movie, E6.d dVar) {
        super(2, dVar);
        this.f1906w = sVar;
        this.f1907x = movie;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) {
        return ((q) 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 q(this.f1906w, this.f1907x, dVar);
    }

    /* JADX WARN: Code restructure failed: missing block: B:19:0x005e, code lost:
    
        if (r2.f(r1, r6) == r0) goto L20;
     */
    @Override // G6.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object p(Object obj) throws Throwable {
        Object objA;
        F6.a aVar = F6.a.f2580q;
        int i = this.f1905v;
        s sVar = this.f1906w;
        if (i == 0) {
            C1.N(obj);
            Movie movie = this.f1907x;
            this.f1905v = 1;
            objA = sVar.f1911d.a(movie.f11069q, movie.f11076x, this);
            if (objA != aVar) {
            }
            return aVar;
        }
        if (i != 1) {
            if (i != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            C1.N(obj);
            return A6.n.f457a;
        }
        C1.N(obj);
        objA = ((A6.j) obj).f449q;
        if (!(objA instanceof A6.i)) {
            List list = (List) objA;
            P6.g.e(list, "<this>");
            y yVar = new y(list);
            K k8 = sVar.f1912e;
            k8.getClass();
            k8.g(null, yVar);
        }
        Throwable thA = A6.j.a(objA);
        if (thA != null) {
            this.f1904u = objA;
            this.f1905v = 2;
        }
        return A6.n.f457a;
    }
}
