package androidx.fragment.app;

import android.annotation.SuppressLint;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import androidx.lifecycle.Lifecycle;
import java.util.ArrayList;
import ῲ.Ԕ.K.AbstractC1558;
import ῲ.Ԕ.K.C1535;
import ῲ.Ԕ.K.LayoutInflater$Factory2C1545;

@SuppressLint({"BanParcelableUsage"})
public final class BackStackState implements Parcelable {
    public static final Parcelable.Creator<BackStackState> CREATOR = new C0179();

    /* renamed from: ʬ  reason: contains not printable characters */
    public final ArrayList<String> f1258;

    /* renamed from: Ԕ  reason: contains not printable characters */
    public final ArrayList<String> f1259;

    /* renamed from: ؿ  reason: contains not printable characters */
    public final boolean f1260;

    /* renamed from: ඓ  reason: contains not printable characters */
    public final int[] f1261;

    /* renamed from: ᕣ  reason: contains not printable characters */
    public final CharSequence f1262;

    /* renamed from: ᨨ  reason: contains not printable characters */
    public final int f1263;

    /* renamed from: ῲ  reason: contains not printable characters */
    public final int[] f1264;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public final int f1265;

    /* renamed from: 㑃  reason: contains not printable characters */
    public final int f1266;

    /* renamed from: 㗗  reason: contains not printable characters */
    public final ArrayList<String> f1267;

    /* renamed from: 㳳  reason: contains not printable characters */
    public final int f1268;

    /* renamed from: 㴹  reason: contains not printable characters */
    public final int f1269;

    /* renamed from: 㸾  reason: contains not printable characters */
    public final int[] f1270;

    /* renamed from: 㿎  reason: contains not printable characters */
    public final String f1271;

    /* renamed from: 䁗  reason: contains not printable characters */
    public final CharSequence f1272;

    /* renamed from: androidx.fragment.app.BackStackState$K  reason: contains not printable characters */
    public static class C0179 implements Parcelable.Creator<BackStackState> {
        /* Return type fixed from 'java.lang.Object' to match base method */
        @Override // android.os.Parcelable.Creator
        public BackStackState createFromParcel(Parcel parcel) {
            return new BackStackState(parcel);
        }

        /* Return type fixed from 'java.lang.Object[]' to match base method */
        @Override // android.os.Parcelable.Creator
        public BackStackState[] newArray(int i) {
            return new BackStackState[i];
        }
    }

    public BackStackState(C1535 k) {
        int size = k.f5716.size();
        this.f1264 = new int[(size * 5)];
        if (k.f5722) {
            this.f1258 = new ArrayList<>(size);
            this.f1270 = new int[size];
            this.f1261 = new int[size];
            int i = 0;
            int i2 = 0;
            while (i < size) {
                AbstractC1558.C1559 k2 = k.f5716.get(i);
                int i3 = i2 + 1;
                this.f1264[i2] = k2.f5728;
                ArrayList<String> arrayList = this.f1258;
                Fragment fragment = k2.f5726;
                arrayList.add(fragment != null ? fragment.mWho : null);
                int[] iArr = this.f1264;
                int i4 = i3 + 1;
                iArr[i3] = k2.f5724;
                int i5 = i4 + 1;
                iArr[i4] = k2.f5730;
                int i6 = i5 + 1;
                iArr[i5] = k2.f5725;
                iArr[i6] = k2.f5729;
                this.f1270[i] = k2.f5727.ordinal();
                this.f1261[i] = k2.f5731.ordinal();
                i++;
                i2 = i6 + 1;
            }
            this.f1269 = k.f5720;
            this.f1265 = k.f5715;
            this.f1271 = k.f5713;
            this.f1263 = k.f5611;
            this.f1268 = k.f5719;
            this.f1262 = k.f5712;
            this.f1266 = k.f5717;
            this.f1272 = k.f5723;
            this.f1259 = k.f5708;
            this.f1267 = k.f5718;
            this.f1260 = k.f5709;
            return;
        }
        throw new IllegalStateException("Not on back stack");
    }

    public int describeContents() {
        return 0;
    }

    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeIntArray(this.f1264);
        parcel.writeStringList(this.f1258);
        parcel.writeIntArray(this.f1270);
        parcel.writeIntArray(this.f1261);
        parcel.writeInt(this.f1269);
        parcel.writeInt(this.f1265);
        parcel.writeString(this.f1271);
        parcel.writeInt(this.f1263);
        parcel.writeInt(this.f1268);
        TextUtils.writeToParcel(this.f1262, parcel, 0);
        parcel.writeInt(this.f1266);
        TextUtils.writeToParcel(this.f1272, parcel, 0);
        parcel.writeStringList(this.f1259);
        parcel.writeStringList(this.f1267);
        parcel.writeInt(this.f1260 ? 1 : 0);
    }

    /* renamed from: K  reason: contains not printable characters */
    public C1535 m678(LayoutInflater$Factory2C1545 r7) {
        C1535 k = new C1535(r7);
        int i = 0;
        int i2 = 0;
        while (i < this.f1264.length) {
            AbstractC1558.C1559 k2 = new AbstractC1558.C1559();
            int i3 = i + 1;
            k2.f5728 = this.f1264[i];
            String str = this.f1258.get(i2);
            if (str != null) {
                k2.f5726 = r7.f5675.get(str);
            } else {
                k2.f5726 = null;
            }
            k2.f5727 = Lifecycle.State.values()[this.f1270[i2]];
            k2.f5731 = Lifecycle.State.values()[this.f1261[i2]];
            int[] iArr = this.f1264;
            int i4 = i3 + 1;
            k2.f5724 = iArr[i3];
            int i5 = i4 + 1;
            k2.f5730 = iArr[i4];
            int i6 = i5 + 1;
            k2.f5725 = iArr[i5];
            k2.f5729 = iArr[i6];
            k.f5714 = k2.f5724;
            k.f5707 = k2.f5730;
            k.f5721 = k2.f5725;
            k.f5710 = k2.f5729;
            k.m4102(k2);
            i2++;
            i = i6 + 1;
        }
        k.f5720 = this.f1269;
        k.f5715 = this.f1265;
        k.f5713 = this.f1271;
        k.f5611 = this.f1263;
        k.f5722 = true;
        k.f5719 = this.f1268;
        k.f5712 = this.f1262;
        k.f5717 = this.f1266;
        k.f5723 = this.f1272;
        k.f5708 = this.f1259;
        k.f5718 = this.f1267;
        k.f5709 = this.f1260;
        k.m3936(1);
        return k;
    }

    public BackStackState(Parcel parcel) {
        this.f1264 = parcel.createIntArray();
        this.f1258 = parcel.createStringArrayList();
        this.f1270 = parcel.createIntArray();
        this.f1261 = parcel.createIntArray();
        this.f1269 = parcel.readInt();
        this.f1265 = parcel.readInt();
        this.f1271 = parcel.readString();
        this.f1263 = parcel.readInt();
        this.f1268 = parcel.readInt();
        this.f1262 = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
        this.f1266 = parcel.readInt();
        this.f1272 = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
        this.f1259 = parcel.createStringArrayList();
        this.f1267 = parcel.createStringArrayList();
        this.f1260 = parcel.readInt() != 0;
    }
}
