package T1;

import O1.A;
import O1.C0234j;
import O1.G;
import O1.H;
import O6.p;
import com.google.android.gms.internal.measurement.C1;

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

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

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

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public /* synthetic */ Object f6489w;

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public b(E6.d dVar, A a3, c cVar) {
        super(2, dVar);
        this.f6490x = a3;
        this.f6491y = cVar;
    }

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

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        b bVar = new b(dVar, this.f6490x, this.f6491y);
        bVar.f6489w = obj;
        return bVar;
    }

    /* JADX WARN: Removed duplicated region for block: B:33:0x0094 A[PHI: r1 r10
      0x0094: PHI (r1v7 O1.H) = (r1v4 O1.H), (r1v12 O1.H) binds: [B:31:0x0091, B:15:0x002c] A[DONT_GENERATE, DONT_INLINE]
      0x0094: PHI (r10v13 java.lang.Object) = (r10v11 java.lang.Object), (r10v0 java.lang.Object) binds: [B:31:0x0091, B:15:0x002c] A[DONT_GENERATE, DONT_INLINE]] */
    /* JADX WARN: Removed duplicated region for block: B:36:0x009f  */
    /* JADX WARN: Removed duplicated region for block: B:39:0x00a9  */
    @Override // G6.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object p(Object obj) throws Throwable {
        G g8;
        H h8;
        G g9;
        H h9;
        H h10;
        Object objB;
        Object obj2;
        F6.a aVar = F6.a.f2580q;
        int i = this.f6488v;
        c cVar = this.f6491y;
        A a3 = this.f6490x;
        if (i == 0) {
            C1.N(obj);
            H h11 = (H) this.f6489w;
            g8 = G.f4944r;
            this.f6489w = h11;
            this.f6487u = g8;
            this.f6488v = 1;
            Object objB2 = h11.b(this);
            if (objB2 != aVar) {
                h8 = h11;
                obj = objB2;
            }
            return aVar;
        }
        if (i != 1) {
            if (i == 2) {
                g8 = this.f6487u;
                h10 = (H) this.f6489w;
                C1.N(obj);
                g9 = g8;
                h9 = h10;
                a aVar2 = new a(null, cVar);
                this.f6489w = h9;
                this.f6487u = null;
                this.f6488v = 3;
                obj = h9.d(g9, aVar2, this);
                if (obj != aVar) {
                    this.f6489w = obj;
                    this.f6488v = 4;
                    objB = h9.b(this);
                    if (objB != aVar) {
                    }
                }
                return aVar;
            }
            if (i != 3) {
                if (i != 4) {
                    if (i != 5) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    C1.N(obj);
                    return obj;
                }
                obj2 = this.f6489w;
                C1.N(obj);
                if (!((Boolean) obj).booleanValue()) {
                    a3.d().a();
                }
                return obj2;
            }
            h9 = (H) this.f6489w;
            C1.N(obj);
            this.f6489w = obj;
            this.f6488v = 4;
            objB = h9.b(this);
            if (objB != aVar) {
                obj2 = obj;
                obj = objB;
                if (!((Boolean) obj).booleanValue()) {
                }
                return obj2;
            }
            return aVar;
        }
        g8 = this.f6487u;
        h8 = (H) this.f6489w;
        C1.N(obj);
        if (((Boolean) obj).booleanValue()) {
            g9 = g8;
            h9 = h8;
            a aVar22 = new a(null, cVar);
            this.f6489w = h9;
            this.f6487u = null;
            this.f6488v = 3;
            obj = h9.d(g9, aVar22, this);
            if (obj != aVar) {
            }
            return aVar;
        }
        C0234j c0234jD = a3.d();
        this.f6489w = h8;
        this.f6487u = g8;
        this.f6488v = 2;
        if (c0234jD.b(this) != aVar) {
            h10 = h8;
            g9 = g8;
            h9 = h10;
            a aVar222 = new a(null, cVar);
            this.f6489w = h9;
            this.f6487u = null;
            this.f6488v = 3;
            obj = h9.d(g9, aVar222, this);
            if (obj != aVar) {
            }
        }
        return aVar;
    }
}
