package G5;

import Z6.InterfaceC0382w;
import com.google.android.gms.internal.measurement.C1;
import java.util.List;
import l5.EnumC1134c;
import o5.C1376o;

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

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

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

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public List f3002w;

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

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public final /* synthetic */ q f3004y;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public o(q qVar, E6.d dVar) {
        super(2, dVar);
        this.f3004y = qVar;
    }

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

    /* JADX WARN: Code restructure failed: missing block: B:21:0x005b, code lost:
    
        if (Z6.AbstractC0385z.h(1000, r8) == r0) goto L29;
     */
    /* JADX WARN: Code restructure failed: missing block: B:28:0x0077, code lost:
    
        if (r5.f(r9, r8) == r0) goto L29;
     */
    /* JADX WARN: Removed duplicated region for block: B:27:0x006a  */
    @Override // G6.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object p(Object obj) throws Throwable {
        Object objA;
        Object obj2;
        List list;
        q qVar;
        Throwable thA;
        F6.a aVar = F6.a.f2580q;
        int i = this.f3003x;
        q qVar2 = this.f3004y;
        if (i == 0) {
            C1.N(obj);
            C1376o c1376o = qVar2.f3008d;
            EnumC1134c enumC1134c = EnumC1134c.f14394q;
            this.f3003x = 1;
            objA = c1376o.a(enumC1134c, this);
            if (objA != aVar) {
            }
            return aVar;
        }
        if (i != 1) {
            if (i != 2) {
                if (i != 3) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                C1.N(obj);
                return A6.n.f457a;
            }
            list = this.f3002w;
            qVar = this.f3001v;
            obj2 = this.f3000u;
            C1.N(obj);
            qVar.f3011g.f(list);
            thA = A6.j.a(obj2);
            if (thA != null) {
                this.f3000u = obj2;
                this.f3001v = null;
                this.f3002w = null;
                this.f3003x = 3;
            }
            return A6.n.f457a;
        }
        C1.N(obj);
        objA = ((A6.j) obj).f449q;
        obj2 = objA;
        if (obj2 instanceof A6.i) {
            thA = A6.j.a(obj2);
            if (thA != null) {
            }
            return A6.n.f457a;
        }
        list = (List) obj2;
        if (list.isEmpty()) {
            this.f3000u = obj2;
            this.f3001v = qVar2;
            this.f3002w = list;
            this.f3003x = 2;
        }
        qVar = qVar2;
        qVar.f3011g.f(list);
        thA = A6.j.a(obj2);
        if (thA != null) {
        }
        return A6.n.f457a;
        return aVar;
    }
}
