package androidx.emoji2.text;

/* JADX INFO: loaded from: classes.dex */
public final class l0 {

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static l0 f2245d;

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public long f2247b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public long f2248c;

    public /* synthetic */ l0(int i10) {
        this.f2246a = i10;
        if (i10 != 5) {
            return;
        }
        this.f2247b = -9223372036854775807L;
        this.f2248c = -9223372036854775807L;
    }

    public void a(double d10, double d11, long j10) {
        double d12 = (0.01720197f * ((j10 - 946728000000L) / 8.64E7f)) + 6.24006f;
        double dSin = (Math.sin(r4 * 3.0f) * 5.236000106378924E-6d) + (Math.sin(2.0f * r4) * 3.4906598739326E-4d) + (Math.sin(d12) * 0.03341960161924362d) + d12 + 1.796593063d + 3.141592653589793d;
        double dSin2 = (Math.sin(2.0d * dSin) * (-0.0069d)) + (Math.sin(d12) * 0.0053d) + ((double) (Math.round(((double) (r3 - 9.0E-4f)) - r7) + 9.0E-4f)) + ((-d11) / 360.0d);
        double dAsin = Math.asin(Math.sin(0.4092797040939331d) * Math.sin(dSin));
        double d13 = 0.01745329238474369d * d10;
        double dSin3 = (Math.sin(-0.10471975803375244d) - (Math.sin(dAsin) * Math.sin(d13))) / (Math.cos(dAsin) * Math.cos(d13));
        if (dSin3 >= 1.0d) {
            this.f2246a = 1;
            this.f2247b = -1L;
            this.f2248c = -1L;
        } else {
            if (dSin3 <= -1.0d) {
                this.f2246a = 0;
                this.f2247b = -1L;
                this.f2248c = -1L;
                return;
            }
            double dAcos = (float) (Math.acos(dSin3) / 6.283185307179586d);
            this.f2247b = Math.round((dSin2 + dAcos) * 8.64E7d) + 946728000000L;
            long jRound = Math.round((dSin2 - dAcos) * 8.64E7d) + 946728000000L;
            this.f2248c = jRound;
            if (jRound >= j10 || this.f2247b <= j10) {
                this.f2246a = 1;
            } else {
                this.f2246a = 0;
            }
        }
    }

    public long b() {
        switch (this.f2246a) {
        }
        return this.f2247b;
    }

    public /* synthetic */ l0(int i10, int i11) {
        this.f2246a = i10;
        this.f2247b = 0L;
        this.f2248c = 0L;
    }

    public /* synthetic */ l0(long j10, long j11, int i10) {
        this.f2246a = i10;
        this.f2247b = j10;
        this.f2248c = j11;
    }
}
