package j$.time.temporal;

/* JADX INFO: compiled from: r8-map-id-da1bda724d8b26dc30f90d2ccf434f42461d6c82e7dbdeb074f412e5504de99c */
/* JADX INFO: 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);
        }
    }
}
