package R5;

import Z6.InterfaceC0382w;
import com.google.android.gms.internal.measurement.C1;
import com.martsnew.domain.model.Movie;
import java.util.ArrayList;
import java.util.List;
import y5.C1763h;

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

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

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public J(P p3, Movie movie, E6.d dVar) {
        super(2, dVar);
        this.f6104w = p3;
        this.f6105x = movie;
    }

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

    /* JADX WARN: Code restructure failed: missing block: B:19:0x0077, 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.f6103v;
        P p3 = this.f6104w;
        if (i == 0) {
            C1.N(obj);
            Movie movie = this.f6105x;
            this.f6103v = 1;
            objA = p3.f6128h.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;
            p3.f6134o.clear();
            p3.f6134o.addAll(list);
            ArrayList arrayList = p3.f6140u;
            arrayList.clear();
            P6.g.e(list, "<this>");
            arrayList.addAll(new B6.y(list));
            C1763h c1763h = new C1763h(z.f6201c);
            c7.K k8 = p3.f6132m;
            k8.getClass();
            k8.g(null, c1763h);
        }
        Throwable thA = A6.j.a(objA);
        if (thA != null) {
            this.f6102u = objA;
            this.f6103v = 2;
        }
        return A6.n.f457a;
    }
}
