package j$.time.temporal;

/* compiled from: r8-map-id-d03341a5c506013191640b89b63ea5cf7ac75763b497b0603d90d740714f0f53 */
/* loaded from: classes2.dex */
public final /* synthetic */ class m implements l {
    public final /* synthetic */ int a;
    public final /* synthetic */ int b;

    public /* synthetic */ m(int i, int i2) {
        this.a = i2;
        this.b = i;
    }

    @Override // j$.time.temporal.l
    public final Temporal q(Temporal temporal) {
        int i = this.a;
        int i2 = this.b;
        switch (i) {
            case 0:
                int iK = temporal.k(a.DAY_OF_WEEK);
                if (iK == i2) {
                    return temporal;
                }
                return temporal.d(iK - i2 >= 0 ? 7 - r0 : -r0, ChronoUnit.DAYS);
            default:
                int iK2 = temporal.k(a.DAY_OF_WEEK);
                if (iK2 == i2) {
                    return temporal;
                }
                return temporal.u(i2 - iK2 >= 0 ? 7 - r2 : -r2, ChronoUnit.DAYS);
        }
    }
}
