package defpackage;

import androidx.work.impl.WorkerStoppedException;
import java.util.concurrent.CancellationException;

/* JADX INFO: renamed from: ˈˆᵶ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C1041 extends AbstractC2498 implements InterfaceC0321 {

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public final /* synthetic */ C4351 f4494;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final /* synthetic */ int f4495;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public int f4496;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ C1041(C4351 c4351, InterfaceC2643 interfaceC2643, int i) {
        super(2, interfaceC2643);
        this.f4495 = i;
        this.f4494 = c4351;
    }

    @Override // defpackage.AbstractC1090
    /* JADX INFO: renamed from: ˊᵙᵾᵲ */
    public final Object mo1078(Object obj) {
        Object c2828;
        int i = this.f4495;
        EnumC0111 enumC0111 = EnumC0111.f1384;
        C4351 c4351 = this.f4494;
        InterfaceC2643 interfaceC2643 = null;
        switch (i) {
            case 0:
                int i2 = this.f4496;
                if (i2 == 0) {
                    ᵟˌᵫ.ˊˌˊ(obj);
                    this.f4496 = 1;
                    Object objM9372 = C4351.m9372(c4351, this);
                    return objM9372 == enumC0111 ? enumC0111 : objM9372;
                }
                if (i2 == 1) {
                    ᵟˌᵫ.ˊˌˊ(obj);
                    return obj;
                }
                ᵕᵩʽᵲ.ᵪᵹᵥᵻ("call to 'resume' before 'invoke' with coroutine");
                return null;
            default:
                int i3 = this.f4496;
                try {
                    if (i3 == 0) {
                        ᵟˌᵫ.ˊˌˊ(obj);
                        C1204 c1204 = c4351.f16550;
                        C1041 c1041 = new C1041(c4351, interfaceC2643, 0);
                        this.f4496 = 1;
                        obj = ᵲᵧˇ.ᵠˏˏ(c1204, c1041, this);
                        if (obj == enumC0111) {
                            return enumC0111;
                        }
                    } else {
                        if (i3 != 1) {
                            ᵕᵩʽᵲ.ᵪᵹᵥᵻ("call to 'resume' before 'invoke' with coroutine");
                            return null;
                        }
                        ᵟˌᵫ.ˊˌˊ(obj);
                    }
                    c2828 = (AbstractC1310) obj;
                    break;
                } catch (WorkerStoppedException e) {
                    c2828 = new C2512(e.f981);
                } catch (CancellationException unused) {
                    c2828 = new C2828();
                } catch (Throwable unused2) {
                    int i4 = AbstractC5214.f19639;
                    C3814.m8515().getClass();
                    c2828 = new C2828();
                }
                return c4351.f16547.m679(new CallableC2397(c2828, 3, c4351));
        }
    }

    @Override // defpackage.InterfaceC0321
    /* JADX INFO: renamed from: ᵝᵶ */
    public final Object mo1564(Object obj, Object obj2) {
        int i = this.f4495;
        C5063 c5063 = C5063.f19112;
        InterfaceC4057 interfaceC4057 = (InterfaceC4057) obj;
        InterfaceC2643 interfaceC2643 = (InterfaceC2643) obj2;
        switch (i) {
        }
        return ((C1041) mo1565(interfaceC2643, interfaceC4057)).mo1078(c5063);
    }

    @Override // defpackage.AbstractC1090
    /* JADX INFO: renamed from: ᵟᵹᵙ */
    public final InterfaceC2643 mo1565(InterfaceC2643 interfaceC2643, Object obj) {
        int i = this.f4495;
        C4351 c4351 = this.f4494;
        switch (i) {
            case 0:
                return new C1041(c4351, interfaceC2643, 0);
            default:
                return new C1041(c4351, interfaceC2643, 1);
        }
    }
}
