package com.ifpdos.debugmenu;

import androidx.annotation.Keep;
import com.google.gson.annotations.SerializedName;
import g.h0.c.g;
import g.h0.c.l;
import g.i;
import h.b.h;
import h.b.m.e;
import h.b.n.c;
import h.b.n.d;
import h.b.n.f;
import h.b.o.a1;
import h.b.o.b0;
import h.b.o.i1;
import h.b.o.z0;

/* JADX INFO: compiled from: ProtocolDefine.kt */
/* JADX INFO: loaded from: classes.dex */
@i
@Keep
@h
public final class BooleanValue {
    public static final b Companion = new b(null);

    @SerializedName("value")
    private final boolean value;

    /* JADX INFO: compiled from: ProtocolDefine.kt */
    @i
    public static final class a implements b0<BooleanValue> {
        public static final a a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public static final /* synthetic */ z0 f1954b;

        static {
            a aVar = new a();
            a = aVar;
            z0 z0Var = new z0("com.ifpdos.debugmenu.BooleanValue", aVar, 1);
            z0Var.k("value", false);
            f1954b = z0Var;
        }

        @Override // h.b.b, h.b.j, h.b.a
        public e a() {
            return f1954b;
        }

        @Override // h.b.o.b0
        public h.b.b<?>[] b() {
            return a1.a;
        }

        @Override // h.b.a
        public Object c(h.b.n.e eVar) {
            boolean zS;
            l.f(eVar, "decoder");
            z0 z0Var = f1954b;
            c cVarC = eVar.c(z0Var);
            int i2 = 1;
            if (cVarC.y()) {
                zS = cVarC.s(z0Var, 0);
            } else {
                zS = false;
                int i3 = 0;
                while (i2 != 0) {
                    int iX = cVarC.x(z0Var);
                    if (iX == -1) {
                        i2 = 0;
                    } else {
                        if (iX != 0) {
                            throw new h.b.l(iX);
                        }
                        zS = cVarC.s(z0Var, 0);
                        i3 |= 1;
                    }
                }
                i2 = i3;
            }
            cVarC.a(z0Var);
            return new BooleanValue(i2, zS, null);
        }

        @Override // h.b.j
        public void d(f fVar, Object obj) {
            BooleanValue booleanValue = (BooleanValue) obj;
            l.f(fVar, "encoder");
            l.f(booleanValue, "value");
            z0 z0Var = f1954b;
            d dVarC = fVar.c(z0Var);
            BooleanValue.write$Self(booleanValue, dVarC, z0Var);
            dVarC.a(z0Var);
        }

        @Override // h.b.o.b0
        public h.b.b<?>[] e() {
            return new h.b.b[]{h.b.o.h.a};
        }
    }

    /* JADX INFO: compiled from: ProtocolDefine.kt */
    @i
    public static final class b {
        public b() {
        }

        public final h.b.b<BooleanValue> serializer() {
            return a.a;
        }

        public b(g gVar) {
        }
    }

    public BooleanValue(int i2, boolean z, i1 i1Var) {
        if (1 == (i2 & 1)) {
            this.value = z;
        } else {
            a aVar = a.a;
            f.a.y.a.d1(i2, 1, a.f1954b);
            throw null;
        }
    }

    public static /* synthetic */ BooleanValue copy$default(BooleanValue booleanValue, boolean z, int i2, Object obj) {
        if ((i2 & 1) != 0) {
            z = booleanValue.value;
        }
        return booleanValue.copy(z);
    }

    public static final /* synthetic */ void write$Self(BooleanValue booleanValue, d dVar, e eVar) {
        dVar.s(eVar, 0, booleanValue.value);
    }

    public final boolean component1() {
        return this.value;
    }

    public final BooleanValue copy(boolean z) {
        return new BooleanValue(z);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        return (obj instanceof BooleanValue) && this.value == ((BooleanValue) obj).value;
    }

    public final boolean getValue() {
        return this.value;
    }

    public int hashCode() {
        boolean z = this.value;
        if (z) {
            return 1;
        }
        return z ? 1 : 0;
    }

    public String toString() {
        StringBuilder sbB = d.b.a.a.a.B("BooleanValue(value=");
        sbB.append(this.value);
        sbB.append(')');
        return sbB.toString();
    }

    public BooleanValue(boolean z) {
        this.value = z;
    }
}
