package p;

import B.AbstractC0085s0;
import G0.InterfaceC0247b0;
import G0.InterfaceC0249c0;
import G0.q0;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.SnapshotStateKt__SnapshotStateKt;
import q.AbstractC2771e;
import q.C2769d;
import q.C2790n0;

/* JADX INFO: loaded from: classes.dex */
public final class k0 extends AbstractC0085s0 {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public C2790n0 f22768b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public long f22769c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public long f22770d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public boolean f22771e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final MutableState f22772f;

    public k0(C2790n0 c2790n0) {
        super(1);
        this.f22768b = c2790n0;
        this.f22769c = AbstractC2642D.f22617a;
        this.f22770d = h1.b.b(0, 0, 15);
        this.f22772f = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(null, null, 2, null);
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Override // B.AbstractC0085s0, I0.InterfaceC0315y
    /* JADX INFO: renamed from: measure-3p2s80s */
    public final InterfaceC0247b0 mo0measure3p2s80s(InterfaceC0249c0 interfaceC0249c0, G0.Z z6, long j4) {
        q0 q0VarQ;
        char c6;
        long j6;
        h0 h0Var;
        long jD;
        h0 h0Var2;
        if (interfaceC0249c0.U()) {
            this.f22770d = j4;
            this.f22771e = true;
            q0VarQ = z6.Q(j4);
        } else {
            q0VarQ = z6.Q(this.f22771e ? this.f22770d : j4);
        }
        q0 q0Var = q0VarQ;
        long j7 = (((long) q0Var.f1999b) & 4294967295L) | (((long) q0Var.f1998a) << 32);
        if (interfaceC0249c0.U()) {
            this.f22769c = j7;
            c6 = ' ';
            jD = j7;
            j6 = jD;
        } else {
            long j8 = !h1.l.a(this.f22769c, AbstractC2642D.f22617a) ? this.f22769c : j7;
            MutableState mutableState = this.f22772f;
            h0 h0Var3 = (h0) mutableState.getValue();
            if (h0Var3 != null) {
                C2769d c2769d = h0Var3.f22750a;
                c6 = ' ';
                j6 = j7;
                boolean z7 = (h1.l.a(j8, ((h1.l) c2769d.d()).f16627a) || ((Boolean) c2769d.f23287d.getValue()).booleanValue()) ? false : true;
                if (!h1.l.a(j8, ((h1.l) c2769d.f23288e.getValue()).f16627a) || z7) {
                    h0Var3.f22751b = ((h1.l) c2769d.d()).f16627a;
                    h0Var2 = h0Var3;
                    V4.E.y(getCoroutineScope(), null, null, new i0(h0Var2, j8, this, null), 3);
                } else {
                    h0Var2 = h0Var3;
                }
                h0Var = h0Var2;
            } else {
                c6 = ' ';
                j6 = j7;
                long j9 = 1;
                h0Var = new h0(new C2769d(new h1.l(j8), AbstractC2771e.f23312q, new h1.l((j9 << 32) | (j9 & 4294967295L)), 8), j8);
            }
            mutableState.setValue(h0Var);
            jD = h1.b.d(j4, ((h1.l) h0Var.f22750a.d()).f16627a);
        }
        int i6 = (int) (jD >> c6);
        int i7 = (int) (jD & 4294967295L);
        return interfaceC0249c0.e(i6, i7, x4.z.f26066a, new j0(this, j6, i6, i7, interfaceC0249c0, q0Var));
    }

    @Override // i0.AbstractC2254r
    public final void onAttach() {
        super.onAttach();
        this.f22769c = AbstractC2642D.f22617a;
        this.f22771e = false;
    }

    @Override // i0.AbstractC2254r
    public final void onReset() {
        super.onReset();
        this.f22772f.setValue(null);
    }
}
