package o; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.io.Serializable; import org.threeten.bp.temporal.UnsupportedTemporalTypeException; /* renamed from: o.gtk, reason: case insensitive filesystem */ /* loaded from: classes6.dex */ public final class C15550gtk extends gsK implements Serializable { private static final long serialVersionUID = -8722293800195731463L; private final C15520gsp isoDate; @Override // o.gsK, o.InterfaceC15536gtL public final /* bridge */ /* synthetic */ long until(InterfaceC15536gtL interfaceC15536gtL, InterfaceC15539gtV interfaceC15539gtV) { return super.until(interfaceC15536gtL, interfaceC15539gtV); } public static C15550gtk now() { return now(AbstractC15514gsj.systemDefaultZone()); } public static C15550gtk now(AbstractC15502gsH abstractC15502gsH) { return now(AbstractC15514gsj.system(abstractC15502gsH)); } public static C15550gtk now(AbstractC15514gsj abstractC15514gsj) { return new C15550gtk(C15520gsp.now(abstractC15514gsj)); } public static C15550gtk of(int i, int i2, int i3) { return C15549gtj.INSTANCE.date(i, i2, i3); } public static C15550gtk from(gtK gtk) { return C15549gtj.INSTANCE.date(gtk); } /* JADX INFO: Access modifiers changed from: package-private */ public C15550gtk(C15520gsp c15520gsp) { gtG.requireNonNull(c15520gsp, "date"); this.isoDate = c15520gsp; } @Override // o.gsJ public final C15549gtj getChronology() { return C15549gtj.INSTANCE; } @Override // o.gsJ public final EnumC15555gtp getEra() { return (EnumC15555gtp) super.getEra(); } @Override // o.gsJ public final int lengthOfMonth() { return this.isoDate.lengthOfMonth(); } @Override // o.gtE, o.gtK public final gtT range(InterfaceC15537gtP interfaceC15537gtP) { if (interfaceC15537gtP instanceof EnumC15534gtD) { if (isSupported(interfaceC15537gtP)) { EnumC15534gtD enumC15534gtD = (EnumC15534gtD) interfaceC15537gtP; int i = AnonymousClass5.$SwitchMap$org$threeten$bp$temporal$ChronoField[enumC15534gtD.ordinal()]; if (i == 1 || i == 2 || i == 3) { return this.isoDate.range(interfaceC15537gtP); } if (i == 4) { gtT range = EnumC15534gtD.YEAR.range(); return gtT.of(1L, getProlepticYear() <= 0 ? (-(range.getMinimum() + 543)) + 1 : 543 + range.getMaximum()); } return getChronology().range(enumC15534gtD); } throw new UnsupportedTemporalTypeException("Unsupported field: ".concat(String.valueOf(interfaceC15537gtP))); } return interfaceC15537gtP.rangeRefinedBy(this); } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.gtk$5, reason: invalid class name */ /* loaded from: classes6.dex */ public static /* synthetic */ class AnonymousClass5 { static final int[] $SwitchMap$org$threeten$bp$temporal$ChronoField; static { int[] iArr = new int[EnumC15534gtD.values().length]; $SwitchMap$org$threeten$bp$temporal$ChronoField = iArr; try { iArr[EnumC15534gtD.DAY_OF_MONTH.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { $SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.DAY_OF_YEAR.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } try { $SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.ALIGNED_WEEK_OF_MONTH.ordinal()] = 3; } catch (NoSuchFieldError unused3) { } try { $SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.YEAR_OF_ERA.ordinal()] = 4; } catch (NoSuchFieldError unused4) { } try { $SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.PROLEPTIC_MONTH.ordinal()] = 5; } catch (NoSuchFieldError unused5) { } try { $SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.YEAR.ordinal()] = 6; } catch (NoSuchFieldError unused6) { } try { $SwitchMap$org$threeten$bp$temporal$ChronoField[EnumC15534gtD.ERA.ordinal()] = 7; } catch (NoSuchFieldError unused7) { } } } @Override // o.gtK public final long getLong(InterfaceC15537gtP interfaceC15537gtP) { if (interfaceC15537gtP instanceof EnumC15534gtD) { int i = AnonymousClass5.$SwitchMap$org$threeten$bp$temporal$ChronoField[((EnumC15534gtD) interfaceC15537gtP).ordinal()]; if (i == 4) { int prolepticYear = getProlepticYear(); if (prolepticYear <= 0) { prolepticYear = 1 - prolepticYear; } return prolepticYear; } if (i == 5) { return getProlepticMonth(); } if (i == 6) { return getProlepticYear(); } if (i != 7) { return this.isoDate.getLong(interfaceC15537gtP); } return getProlepticYear() <= 0 ? 0 : 1; } return interfaceC15537gtP.getFrom(this); } private long getProlepticMonth() { return ((getProlepticYear() * 12) + this.isoDate.getMonthValue()) - 1; } private int getProlepticYear() { return this.isoDate.getYear() + 543; } @Override // o.gsJ, o.AbstractC15535gtF, o.InterfaceC15536gtL public final C15550gtk with(gtJ gtj) { return (C15550gtk) super.with(gtj); } /* JADX WARN: Code restructure failed: missing block: B:12:0x0022, code lost: if (r1 != 7) goto L20; */ /* JADX WARN: Type inference failed for: r7v16, types: [o.gtk] */ @Override // o.gsJ, o.InterfaceC15536gtL /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final o.C15550gtk with(o.InterfaceC15537gtP r7, long r8) { /* r6 = this; boolean r0 = r7 instanceof o.EnumC15534gtD if (r0 == 0) goto L92 r0 = r7 o.gtD r0 = (o.EnumC15534gtD) r0 long r1 = r6.getLong(r0) int r1 = (r1 > r8 ? 1 : (r1 == r8 ? 0 : -1)) if (r1 != 0) goto L10 return r6 L10: int[] r1 = o.C15550gtk.AnonymousClass5.$SwitchMap$org$threeten$bp$temporal$ChronoField int r2 = r0.ordinal() r1 = r1[r2] r2 = 7 r3 = 6 r4 = 4 if (r1 == r4) goto L3a r5 = 5 if (r1 == r5) goto L25 if (r1 == r3) goto L3a if (r1 == r2) goto L3a goto L54 L25: o.gtj r7 = r6.getChronology() o.gtT r7 = r7.range(r0) r7.checkValidValue(r8, r0) long r0 = r6.getProlepticMonth() long r8 = r8 - r0 o.gtk r7 = r6.plusMonths(r8) return r7 L3a: o.gtj r1 = r6.getChronology() o.gtT r1 = r1.range(r0) int r1 = r1.checkValidIntValue(r8, r0) int[] r5 = o.C15550gtk.AnonymousClass5.$SwitchMap$org$threeten$bp$temporal$ChronoField int r0 = r0.ordinal() r0 = r5[r0] if (r0 == r4) goto L7d if (r0 == r3) goto L70 if (r0 == r2) goto L5f L54: o.gsp r0 = r6.isoDate o.gsp r7 = r0.with(r7, r8) o.gtk r7 = r6.with(r7) return r7 L5f: o.gsp r7 = r6.isoDate int r8 = r6.getProlepticYear() int r8 = (-542) - r8 o.gsp r7 = r7.withYear(r8) o.gtk r7 = r6.with(r7) return r7 L70: o.gsp r7 = r6.isoDate int r1 = r1 + (-543) o.gsp r7 = r7.withYear(r1) o.gtk r7 = r6.with(r7) return r7 L7d: o.gsp r7 = r6.isoDate int r8 = r6.getProlepticYear() if (r8 > 0) goto L87 int r1 = 1 - r1 L87: int r1 = r1 + (-543) o.gsp r7 = r7.withYear(r1) o.gtk r7 = r6.with(r7) return r7 L92: o.gtL r7 = r7.adjustInto(r6, r8) o.gtk r7 = (o.C15550gtk) r7 return r7 */ throw new UnsupportedOperationException("Method not decompiled: o.C15550gtk.with(o.gtP, long):o.gtk"); } @Override // o.gsJ, o.AbstractC15535gtF, o.InterfaceC15536gtL public final C15550gtk plus(gtN gtn) { return (C15550gtk) super.plus(gtn); } @Override // o.gsK, o.gsJ, o.InterfaceC15536gtL public final C15550gtk plus(long j, InterfaceC15539gtV interfaceC15539gtV) { return (C15550gtk) super.plus(j, interfaceC15539gtV); } @Override // o.gsJ, o.AbstractC15535gtF, o.InterfaceC15536gtL public final C15550gtk minus(gtN gtn) { return (C15550gtk) super.minus(gtn); } @Override // o.gsJ, o.AbstractC15535gtF, o.InterfaceC15536gtL public final C15550gtk minus(long j, InterfaceC15539gtV interfaceC15539gtV) { return (C15550gtk) super.minus(j, interfaceC15539gtV); } /* JADX INFO: Access modifiers changed from: package-private */ @Override // o.gsK public final gsK plusYears(long j) { return with(this.isoDate.plusYears(j)); } /* JADX INFO: Access modifiers changed from: package-private */ @Override // o.gsK public final gsK plusMonths(long j) { return with(this.isoDate.plusMonths(j)); } /* JADX INFO: Access modifiers changed from: package-private */ @Override // o.gsK public final gsK plusDays(long j) { return with(this.isoDate.plusDays(j)); } private C15550gtk with(C15520gsp c15520gsp) { return c15520gsp.equals(this.isoDate) ? this : new C15550gtk(c15520gsp); } @Override // o.gsK, o.gsJ public final gsO atTime(C15521gsq c15521gsq) { return super.atTime(c15521gsq); } @Override // o.gsK, o.gsJ public final gsT until(gsJ gsj) { C15500gsA until = this.isoDate.until(gsj); return getChronology().period(until.getYears(), until.getMonths(), until.getDays()); } @Override // o.gsJ public final long toEpochDay() { return this.isoDate.toEpochDay(); } @Override // o.gsJ public final boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof C15550gtk) { return this.isoDate.equals(((C15550gtk) obj).isoDate); } return false; } @Override // o.gsJ public final int hashCode() { return getChronology().getId().hashCode() ^ this.isoDate.hashCode(); } private Object writeReplace() { return new C15548gti((byte) 7, this); } /* JADX INFO: Access modifiers changed from: package-private */ public final void writeExternal(DataOutput dataOutput) throws IOException { dataOutput.writeInt(get(EnumC15534gtD.YEAR)); dataOutput.writeByte(get(EnumC15534gtD.MONTH_OF_YEAR)); dataOutput.writeByte(get(EnumC15534gtD.DAY_OF_MONTH)); } /* JADX INFO: Access modifiers changed from: package-private */ public static gsJ readExternal(DataInput dataInput) throws IOException { return C15549gtj.INSTANCE.date(dataInput.readInt(), (int) dataInput.readByte(), (int) dataInput.readByte()); } }