package defpackage;

import java.io.FileOutputStream;

/* JADX INFO: renamed from: ᵯᵨᵟ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C4317 extends C1268 {
    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object m9301(Object obj, AbstractC3500 abstractC3500) {
        C3444 c3444;
        FileOutputStream fileOutputStream;
        FileOutputStream fileOutputStream2;
        if (abstractC3500 instanceof C3444) {
            c3444 = (C3444) abstractC3500;
            int i = c3444.f13284;
            if ((i & Integer.MIN_VALUE) != 0) {
                c3444.f13284 = i - Integer.MIN_VALUE;
            } else {
                c3444 = new C3444(this, abstractC3500);
            }
        }
        Object obj2 = c3444.f13287;
        int i2 = c3444.f13284;
        C5063 c5063 = C5063.f19112;
        if (i2 == 0) {
            ᵟˌᵫ.ˊˌˊ(obj2);
            if (this.f5324.get()) {
                ᵕᵩʽᵲ.ᵪᵹᵥᵻ("This scope has already been closed.");
                return null;
            }
            FileOutputStream fileOutputStream3 = new FileOutputStream(this.f5325);
            try {
                InterfaceC5435 interfaceC5435 = this.f5323;
                C3617 c3617 = new C3617(fileOutputStream3);
                c3444.f13285 = fileOutputStream3;
                c3444.f13286 = fileOutputStream3;
                c3444.f13284 = 1;
                interfaceC5435.mo8268(obj, c3617);
                EnumC0111 enumC0111 = EnumC0111.f1384;
                if (c5063 == enumC0111) {
                    return enumC0111;
                }
                fileOutputStream2 = fileOutputStream3;
                fileOutputStream = fileOutputStream2;
            } catch (Throwable th) {
                th = th;
                fileOutputStream = fileOutputStream3;
                throw th;
            }
        } else {
            if (i2 != 1) {
                ᵕᵩʽᵲ.ᵪᵹᵥᵻ("call to 'resume' before 'invoke' with coroutine");
                return null;
            }
            fileOutputStream2 = c3444.f13286;
            fileOutputStream = c3444.f13285;
            try {
                ᵟˌᵫ.ˊˌˊ(obj2);
            } catch (Throwable th2) {
                th = th2;
                try {
                    throw th;
                } catch (Throwable th3) {
                    ᵱˉˈ.ᵮᵣᵗˈ(fileOutputStream, th);
                    throw th3;
                }
            }
        }
        fileOutputStream2.getFD().sync();
        ᵱˉˈ.ᵮᵣᵗˈ(fileOutputStream, (Throwable) null);
        return c5063;
    }
}
