package n4;

import m4.D;
import p5.C2740j;
import u4.C2965a;

/* JADX INFO: renamed from: n4.a, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes3.dex */
public final class C2623a extends D {

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ C2625c f21624d;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C2623a(C2625c c2625c, int i6) {
        super(c2625c, 1);
        this.f21623c = i6;
        switch (i6) {
            case 1:
                this.f21624d = c2625c;
                super(c2625c, 1);
                u4.b.b();
                break;
            default:
                this.f21624d = c2625c;
                u4.b.b();
                break;
        }
    }

    @Override // m4.D
    public final void a() {
        C2625c c2625c;
        int i6;
        C2625c c2625c2;
        switch (this.f21623c) {
            case 0:
                C2740j c2740j = new C2740j();
                u4.b.c();
                try {
                    C2965a c2965a = u4.b.f24588a;
                    c2965a.getClass();
                    synchronized (this.f21624d.f21627a) {
                        C2740j c2740j2 = this.f21624d.f21628b;
                        c2740j.write(c2740j2, c2740j2.b());
                        c2625c = this.f21624d;
                        c2625c.f21632f = false;
                        i6 = c2625c.f21638p;
                        break;
                    }
                    c2625c.l.write(c2740j, c2740j.f23100b);
                    synchronized (this.f21624d.f21627a) {
                        this.f21624d.f21638p -= i6;
                        break;
                    }
                    c2965a.getClass();
                    return;
                } catch (Throwable th) {
                    try {
                        u4.b.f24588a.getClass();
                        break;
                    } catch (Throwable th2) {
                        th.addSuppressed(th2);
                    }
                    throw th;
                }
            default:
                C2740j c2740j3 = new C2740j();
                u4.b.c();
                try {
                    C2965a c2965a2 = u4.b.f24588a;
                    c2965a2.getClass();
                    synchronized (this.f21624d.f21627a) {
                        C2740j c2740j4 = this.f21624d.f21628b;
                        c2740j3.write(c2740j4, c2740j4.f23100b);
                        c2625c2 = this.f21624d;
                        c2625c2.f21633j = false;
                        break;
                    }
                    c2625c2.l.write(c2740j3, c2740j3.f23100b);
                    this.f21624d.l.flush();
                    c2965a2.getClass();
                    return;
                } catch (Throwable th3) {
                    try {
                        u4.b.f24588a.getClass();
                        break;
                    } catch (Throwable th4) {
                        th3.addSuppressed(th4);
                    }
                    throw th3;
                }
        }
    }
}
