package defpackage;

import java.io.File;
import java.util.concurrent.CancellationException;

/* renamed from: ˉʡᐧᵺ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C1138 extends AbstractC3447 implements InterfaceC0362 {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final /* synthetic */ int f4880;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public final /* synthetic */ Object f4881;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final /* synthetic */ Object f4882;

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

    @Override // defpackage.InterfaceC0362
    /* renamed from: ᵴᵳ */
    public final Object mo1588(Object obj) {
        C3637 c3637;
        int i = this.f4880;
        Object obj2 = this.f4881;
        Object obj3 = this.f4882;
        C3637 c36372 = C3637.f13536;
        switch (i) {
            case 0:
                Throwable th = (Throwable) obj;
                C1864 c1864 = (C1864) obj3;
                if (th == null) {
                    c1864.m5258(((C5111) obj2).m2430());
                    break;
                } else if (!(th instanceof CancellationException)) {
                    c1864.m5259(th);
                    break;
                } else {
                    c1864.f7560 = true;
                    C2372 c2372 = c1864.f7559;
                    if (c2372 != null && c2372.f9296.cancel(true)) {
                        c1864.f7558 = null;
                        c1864.f7559 = null;
                        c1864.f7557 = null;
                        break;
                    }
                }
                break;
            case 1:
                if (ᵲᵝᵪ.ᵹᵝᵶ((String) obj, ((File) obj3).getName())) {
                    C1828 c1828 = (C1828) obj2;
                    Object objMo5181 = c1828.f7422.mo5181(c36372);
                    if (!(objMo5181 instanceof C4283)) {
                        break;
                    } else {
                        Object obj4 = ((C4189) ᵮʛˀ.ˀᵗᵝᵭ(C4555.f16926, new ᵣᵽᵮ(c1828, (InterfaceC4943) null, 15))).f15662;
                        break;
                    }
                }
                break;
            default:
                Throwable th2 = (Throwable) obj;
                ((C5227) obj3).mo1588(th2);
                C3920 c3920 = (C3920) ((ᵮᵥٴ) obj2).ᵾᵬ;
                c3920.m8678(th2, false);
                do {
                    Object objMo5185 = c3920.mo5185();
                    if (objMo5185 instanceof C4283) {
                        objMo5185 = null;
                    }
                    if (objMo5185 != null) {
                        ((C1375) objMo5185).f5659.m2428(new C1411(th2 == null ? new CancellationException("DataStore scope was cancelled before updateData could complete") : th2, false));
                        c3637 = c36372;
                    } else {
                        c3637 = null;
                    }
                } while (c3637 != null);
        }
        return c36372;
    }
}
