package q0;

import p0.C2714u;

/* JADX INFO: renamed from: q0.h, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public class C2816h {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final AbstractC2811c f23532a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final AbstractC2811c f23533b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final AbstractC2811c f23534c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final float[] f23535d;

    public C2816h(AbstractC2811c abstractC2811c, AbstractC2811c abstractC2811c2, AbstractC2811c abstractC2811c3, float[] fArr) {
        this.f23532a = abstractC2811c;
        this.f23533b = abstractC2811c2;
        this.f23534c = abstractC2811c3;
        this.f23535d = fArr;
    }

    public long a(long j4) {
        float fI = C2714u.i(j4);
        float fH = C2714u.h(j4);
        float f6 = C2714u.f(j4);
        float fE = C2714u.e(j4);
        AbstractC2811c abstractC2811c = this.f23533b;
        long jD = abstractC2811c.d(fI, fH, f6);
        float fIntBitsToFloat = Float.intBitsToFloat((int) (jD >> 32));
        float fIntBitsToFloat2 = Float.intBitsToFloat((int) (jD & 4294967295L));
        float fE2 = abstractC2811c.e(fI, fH, f6);
        float[] fArr = this.f23535d;
        if (fArr != null) {
            fIntBitsToFloat *= fArr[0];
            fIntBitsToFloat2 *= fArr[1];
            fE2 *= fArr[2];
        }
        float f7 = fIntBitsToFloat;
        float f8 = fIntBitsToFloat2;
        return this.f23534c.f(f7, f8, fE2, fE, this.f23532a);
    }

    /* JADX WARN: Illegal instructions before constructor call */
    /* JADX WARN: Removed duplicated region for block: B:27:0x0069  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public C2816h(AbstractC2811c abstractC2811c, AbstractC2811c abstractC2811c2, int i6) {
        float[] fArr;
        long j4 = abstractC2811c.f23502b;
        long j6 = AbstractC2810b.f23496a;
        AbstractC2811c abstractC2811cA = AbstractC2810b.a(j4, j6) ? AbstractC2819k.a(abstractC2811c) : abstractC2811c;
        AbstractC2811c abstractC2811cA2 = AbstractC2810b.a(abstractC2811c2.f23502b, j6) ? AbstractC2819k.a(abstractC2811c2) : abstractC2811c2;
        if (i6 == 3) {
            boolean zA = AbstractC2810b.a(abstractC2811c.f23502b, j6);
            boolean zA2 = AbstractC2810b.a(abstractC2811c2.f23502b, j6);
            if (!(zA && zA2) && (zA || zA2)) {
                abstractC2811c = zA ? abstractC2811c : abstractC2811c2;
                float[] fArrA = AbstractC2819k.f23541e;
                C2828t c2828t = ((C2826r) abstractC2811c).f23556d;
                float[] fArrA2 = zA ? c2828t.a() : fArrA;
                fArrA = zA2 ? c2828t.a() : fArrA;
                fArr = new float[]{fArrA2[0] / fArrA[0], fArrA2[1] / fArrA[1], fArrA2[2] / fArrA[2]};
            } else {
                fArr = null;
            }
        }
        this(abstractC2811c2, abstractC2811cA, abstractC2811cA2, fArr);
    }
}
