package defpackage;

import java.io.Serializable;
import kotlinx.coroutines.flow.internal.AbortFlowException;

/* JADX INFO: renamed from: ᵰᵙ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C4377 implements InterfaceC1214 {

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final /* synthetic */ int f16612;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final /* synthetic */ InterfaceC3507 f16613;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public final /* synthetic */ Object f16614;

    public /* synthetic */ C4377(Object obj, InterfaceC3507 interfaceC3507, int i) {
        this.f16612 = i;
        this.f16614 = obj;
        this.f16613 = interfaceC3507;
    }

    /* JADX WARN: Removed duplicated region for block: B:17:0x0051  */
    /* JADX WARN: Removed duplicated region for block: B:47:0x00b7  */
    /* JADX WARN: Removed duplicated region for block: B:59:0x010a  */
    /* JADX WARN: Removed duplicated region for block: B:62:0x0117  */
    /* JADX WARN: Removed duplicated region for block: B:68:0x0142  */
    /* JADX WARN: Removed duplicated region for block: B:70:0x014f  */
    /* JADX WARN: Removed duplicated region for block: B:71:0x0150  */
    /* JADX WARN: Removed duplicated region for block: B:74:0x0155  */
    /* JADX WARN: Removed duplicated region for block: B:87:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:65:0x0133 -> B:66:0x013a). Please report as a decompilation issue!!! */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:71:0x0150 -> B:69:0x0149). Please report as a decompilation issue!!! */
    @Override // defpackage.InterfaceC1214
    /* JADX INFO: renamed from: ʽˈˋ */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object mo1463(InterfaceC4965 interfaceC4965, InterfaceC2643 interfaceC2643) throws Throwable {
        C0064 c0064;
        long j;
        int i;
        InterfaceC4965 interfaceC49652;
        int i2;
        C0064 c00642;
        int i3;
        long j2;
        Throwable th;
        Serializable serializable;
        C4370 c4370;
        C0775 c0775;
        InterfaceC4965 interfaceC49653 = interfaceC4965;
        int i4 = this.f16612;
        int i5 = 0;
        C2164 c2164 = C2164.f8616;
        C5063 c5063 = C5063.f19112;
        EnumC0111 enumC0111 = EnumC0111.f1384;
        ˁᵥᵰᵭ r11 = this.f16613;
        Object obj = this.f16614;
        switch (i4) {
            case 0:
                if (interfaceC2643 instanceof C0064) {
                    c0064 = (C0064) interfaceC2643;
                    int i6 = c0064.f1262;
                    if ((i6 & Integer.MIN_VALUE) != 0) {
                        c0064.f1262 = i6 - Integer.MIN_VALUE;
                    } else {
                        c0064 = new C0064(this, interfaceC2643);
                    }
                }
                Object obj2 = c0064.f1261;
                int i7 = c0064.f1262;
                if (i7 == 0) {
                    ᵟˌᵫ.ˊˌˊ(obj2);
                    j = 0;
                    i = 0;
                    c0064.f1258 = interfaceC49653;
                    c0064.f1259 = null;
                    c0064.f1264 = i;
                    c0064.f1257 = j;
                    c0064.f1260 = i5;
                    c0064.f1262 = 1;
                    serializable = ᵟˌᵫ.ʽˈˋ((C0248) obj, interfaceC49653, c0064);
                    if (serializable != enumC0111) {
                    }
                    return enumC0111;
                }
                if (i7 == 1) {
                    int i8 = c0064.f1260;
                    long j3 = c0064.f1257;
                    int i9 = c0064.f1264;
                    InterfaceC4965 interfaceC49654 = c0064.f1258;
                    ᵟˌᵫ.ˊˌˊ(obj2);
                    i2 = i9;
                    C0064 c00643 = c0064;
                    i3 = i8;
                    j2 = j3;
                    interfaceC49652 = interfaceC49654;
                    c00642 = c00643;
                    th = (Throwable) obj2;
                    if (th == null) {
                    }
                } else {
                    if (i7 != 2) {
                        ᵕᵩʽᵲ.ᵪᵹᵥᵻ("call to 'resume' before 'invoke' with coroutine");
                        return null;
                    }
                    j2 = c0064.f1257;
                    int i10 = c0064.f1264;
                    Throwable th2 = c0064.f1259;
                    interfaceC49652 = c0064.f1258;
                    ᵟˌᵫ.ˊˌˊ(obj2);
                    if (!((Boolean) obj2).booleanValue()) {
                        j2++;
                        i = i10;
                        c00642 = c0064;
                        i3 = 1;
                        long j4 = j2;
                        interfaceC49653 = interfaceC49652;
                        j = j4;
                        if (i3 != 0) {
                            return c5063;
                        }
                        c0064 = c00642;
                        i5 = 0;
                        c0064.f1258 = interfaceC49653;
                        c0064.f1259 = null;
                        c0064.f1264 = i;
                        c0064.f1257 = j;
                        c0064.f1260 = i5;
                        c0064.f1262 = 1;
                        serializable = ᵟˌᵫ.ʽˈˋ((C0248) obj, interfaceC49653, c0064);
                        if (serializable != enumC0111) {
                            i2 = i;
                            obj2 = serializable;
                            c00642 = c0064;
                            i3 = i5;
                            long j5 = j;
                            interfaceC49652 = interfaceC49653;
                            j2 = j5;
                            th = (Throwable) obj2;
                            if (th == null) {
                                Long l = new Long(j2);
                                c00642.f1258 = interfaceC49652;
                                c00642.f1259 = th;
                                c00642.f1264 = i2;
                                c00642.f1257 = j2;
                                c00642.f1260 = i3;
                                c00642.f1262 = 2;
                                Object objMo3959 = ((C3588) r11).mo3959(interfaceC49652, th, l, c00642);
                                if (objMo3959 != enumC0111) {
                                    int i11 = i2;
                                    th2 = th;
                                    obj2 = objMo3959;
                                    c0064 = c00642;
                                    i10 = i11;
                                    if (!((Boolean) obj2).booleanValue()) {
                                        throw th2;
                                    }
                                }
                            } else {
                                i = i2;
                                long j42 = j2;
                                interfaceC49653 = interfaceC49652;
                                j = j42;
                                if (i3 != 0) {
                                }
                            }
                        }
                        return enumC0111;
                    }
                }
                break;
            case 1:
                Object objMo1463 = ((C4377) obj).mo1463(new ᵹᵮˆ(new C2406(), interfaceC49653, (ᵕᵭˎ) r11), interfaceC2643);
                return objMo1463 == enumC0111 ? objMo1463 : c5063;
            case 2:
                if (interfaceC2643 instanceof C4370) {
                    c4370 = (C4370) interfaceC2643;
                    int i12 = c4370.f16604;
                    if ((i12 & Integer.MIN_VALUE) != 0) {
                        c4370.f16604 = i12 - Integer.MIN_VALUE;
                    } else {
                        c4370 = new C4370(this, interfaceC2643);
                    }
                }
                Object obj3 = c4370.f16603;
                int i13 = c4370.f16604;
                if (i13 == 0) {
                    ᵟˌᵫ.ˊˌˊ(obj3);
                    C2604 c2604 = (C2604) obj;
                    C0775 c07752 = new C0775((ᵪʣʦᵬ) r11, 0, interfaceC49653);
                    try {
                        c4370.f16602 = c07752;
                        c4370.f16604 = 1;
                        return c2604.mo1463(c07752, c4370) == enumC0111 ? enumC0111 : c5063;
                    } catch (AbortFlowException e) {
                        e = e;
                        c0775 = c07752;
                    }
                } else {
                    if (i13 != 1) {
                        ᵕᵩʽᵲ.ᵪᵹᵥᵻ("call to 'resume' before 'invoke' with coroutine");
                        return null;
                    }
                    c0775 = c4370.f16602;
                    try {
                        ᵟˌᵫ.ˊˌˊ(obj3);
                        return c5063;
                    } catch (AbortFlowException e2) {
                        e = e2;
                    }
                }
                if (e.f1146 != c0775) {
                    throw e;
                }
                AbstractC3481.m7932(c4370.f13450);
                return c5063;
            case 3:
                Object obj4 = ᵹˊᵫˋ.ᵷᵺʾᵖ(interfaceC2643, interfaceC49653, c2164, new ᵢʛˋˑ((InterfaceC2643) null, (InterfaceC1381) r11, 3), (InterfaceC1214[]) obj);
                return obj4 == enumC0111 ? obj4 : c5063;
            default:
                Object obj5 = ᵹˊᵫˋ.ᵷᵺʾᵖ(interfaceC2643, interfaceC49653, c2164, new ᵢʛˋˑ((InterfaceC2643) null, r11, 4), (InterfaceC1214[]) obj);
                return obj5 == enumC0111 ? obj5 : c5063;
        }
    }
}
