package M5;

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

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

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

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

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

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

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

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

    /* JADX WARN: Code restructure failed: missing block: B:19:0x004e, code lost:
    
        if (r4.f(r1, r7) == 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.f4325v;
        x xVar = this.f4326w;
        if (i == 0) {
            C1.N(obj);
            o5.u uVar = xVar.f4342d;
            Movie movie = this.f4327x;
            this.f4325v = 1;
            objA = uVar.a(movie.f11069q, 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)) {
            xVar.f4349l.f((Movie) objA);
        }
        Throwable thA = A6.j.a(objA);
        if (thA != null) {
            this.f4324u = objA;
            this.f4325v = 2;
        }
        return A6.n.f457a;
    }
}
