package defpackage;

import java.io.File;
import java.util.concurrent.CancellationException;
import kotlinx.coroutines.DispatchException;

/* JADX INFO: renamed from: ᵛᵠᵷˊ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C2797 extends AbstractC4516 implements InterfaceC0778 {

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

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

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public final /* synthetic */ Object f10740;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ C2797(Object obj, int i, Object obj2) {
        super(1);
        this.f10739 = i;
        this.f10738 = obj;
        this.f10740 = obj2;
    }

    @Override // defpackage.InterfaceC0778
    /* JADX INFO: renamed from: ʽˈˋ */
    public final Object mo1706(Object obj) throws DispatchException {
        C5063 c5063;
        int i = this.f10739;
        Object obj2 = this.f10740;
        Object obj3 = this.f10738;
        C5063 c50632 = C5063.f19112;
        switch (i) {
            case 0:
                Throwable th = (Throwable) obj;
                C3394 c3394 = (C3394) obj3;
                if (th == null) {
                    c3394.m7792(((C1315) obj2).m6061());
                } else if (!(th instanceof CancellationException)) {
                    c3394.m7791(th);
                } else {
                    c3394.f13085 = true;
                    C2760 c2760 = c3394.f13082;
                    if (c2760 != null && c2760.f10616.cancel(true)) {
                        c3394.f13084 = null;
                        c3394.f13082 = null;
                        c3394.f13083 = null;
                    }
                }
                break;
            case 1:
                if (ᵥˈᵛ.ˊᵫᵗ((String) obj, ((File) obj3).getName())) {
                    C4717 c4717 = (C4717) obj2;
                    Object objMo1661 = c4717.f17958.mo1661(c50632);
                    if (!(objMo1661 instanceof C0566)) {
                    } else {
                        Object obj4 = ((C5191) ᵲᵧˇ.ˌᵨʠᵫ(C0887.f3911, new ᵤـ(c4717, (InterfaceC2643) null, 15))).f19535;
                    }
                }
                break;
            default:
                Throwable th2 = (Throwable) obj;
                ((C1576) obj3).mo1706(th2);
                C0349 c0349 = (C0349) ((ᵥᵵᵶᵩ) obj2).ᵨᵼⁱ;
                c0349.m1651(th2, false);
                do {
                    Object objMo1635 = c0349.mo1635();
                    if (objMo1635 instanceof C0566) {
                        objMo1635 = null;
                    }
                    if (objMo1635 != null) {
                        ((C3084) objMo1635).f11768.m6065(new C5507(th2 == null ? new CancellationException("DataStore scope was cancelled before updateData could complete") : th2, false));
                        c5063 = c50632;
                    } else {
                        c5063 = null;
                    }
                } while (c5063 != null);
                break;
        }
        return c50632;
    }
}
