package x5;

import Z6.AbstractC0385z;
import Z6.InterfaceC0382w;
import com.google.android.gms.internal.measurement.C1;
import java.io.FileOutputStream;

/* JADX INFO: loaded from: classes.dex */
public final class j extends G6.i implements O6.p {

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public int f18689u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public final /* synthetic */ k f18690v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public final /* synthetic */ int f18691w;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public j(k kVar, int i, E6.d dVar) {
        super(2, dVar);
        this.f18690v = kVar;
        this.f18691w = i;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) {
        return ((j) m((E6.d) obj2, (InterfaceC0382w) obj)).p(A6.n.f457a);
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        return new j(this.f18690v, this.f18691w, dVar);
    }

    @Override // G6.a
    public final Object p(Object obj) throws Throwable {
        F6.a aVar = F6.a.f2580q;
        int i = this.f18689u;
        if (i == 0) {
            C1.N(obj);
            this.f18689u = 1;
            if (AbstractC0385z.h(200L, this) == aVar) {
                return aVar;
            }
        } else {
            if (i != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            C1.N(obj);
        }
        try {
            k kVar = this.f18690v;
            FileOutputStream fileOutputStreamOpenFileOutput = kVar.i.openFileOutput(kVar.f18700m, 0);
            try {
                fileOutputStreamOpenFileOutput.write(this.f18691w);
                fileOutputStreamOpenFileOutput.close();
            } finally {
            }
        } catch (Exception unused) {
        }
        return A6.n.f457a;
    }
}
