package androidx.compose.foundation.gestures; import androidx.compose.ui.geometry.Rect; import androidx.compose.ui.unit.Density; import androidx.compose.ui.unit.DpRect; import kotlin.Metadata; import kotlin.jvm.internal.Intrinsics; import kotlinx.coroutines.sync.Mutex; import kotlinx.coroutines.sync.MutexKt; /* JADX INFO: Access modifiers changed from: package-private */ /* compiled from: TapGestureDetector.kt */ @Metadata(d1 = {"\u0000Z\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0007\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0006\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\b\b\u0002\u0018\u00002\u00020\u00012\u00020\u0002B\r\u0012\u0006\u0010\u0003\u001a\u00020\u0002¢\u0006\u0002\u0010\u0004J\u0011\u0010\u000f\u001a\u00020\u0010H\u0096@ø\u0001\u0000¢\u0006\u0002\u0010\u0011J\u0006\u0010\u0012\u001a\u00020\u0010J\u0006\u0010\u0013\u001a\u00020\u0010J\u0011\u0010\u0014\u001a\u00020\u0010H\u0086@ø\u0001\u0000¢\u0006\u0002\u0010\u0011J\u0011\u0010\u0015\u001a\u00020\u000bH\u0096@ø\u0001\u0000¢\u0006\u0002\u0010\u0011J\u001a\u0010\u0016\u001a\u00020\u0017*\u00020\u0018H\u0097\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u0019\u0010\u001aJ\u001a\u0010\u0016\u001a\u00020\u0017*\u00020\u001bH\u0097\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u001c\u0010\u001dJ\u001a\u0010\u001e\u001a\u00020\u0018*\u00020\u001bH\u0097\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u001f\u0010 J\u001d\u0010\u001e\u001a\u00020\u0018*\u00020\u0005H\u0097\u0001ø\u0001\u0002ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b!\u0010\"J\u001d\u0010\u001e\u001a\u00020\u0018*\u00020\u0017H\u0097\u0001ø\u0001\u0002ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b!\u0010#J\u001a\u0010$\u001a\u00020%*\u00020&H\u0097\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b'\u0010(J\u001a\u0010)\u001a\u00020\u0005*\u00020\u0018H\u0097\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b*\u0010\"J\u001a\u0010)\u001a\u00020\u0005*\u00020\u001bH\u0097\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b+\u0010 J\r\u0010,\u001a\u00020-*\u00020.H\u0097\u0001J\u001a\u0010/\u001a\u00020&*\u00020%H\u0097\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b0\u0010(J\u001a\u00101\u001a\u00020\u001b*\u00020\u0018H\u0097\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b2\u00103J\u001d\u00101\u001a\u00020\u001b*\u00020\u0005H\u0097\u0001ø\u0001\u0002ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b4\u00103J\u001d\u00101\u001a\u00020\u001b*\u00020\u0017H\u0097\u0001ø\u0001\u0002ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b4\u00105R\u0014\u0010\u0003\u001a\u00020\u00058\u0016X\u0097\u0005¢\u0006\u0006\u001a\u0004\b\u0006\u0010\u0007R\u0014\u0010\b\u001a\u00020\u00058\u0016X\u0097\u0005¢\u0006\u0006\u001a\u0004\b\t\u0010\u0007R\u000e\u0010\n\u001a\u00020\u000bX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\f\u001a\u00020\u000bX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\r\u001a\u00020\u000eX\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u000f\n\u0002\b\u0019\n\u0005\b¡\u001e0\u0001\n\u0002\b!¨\u00066"}, d2 = {"Landroidx/compose/foundation/gestures/PressGestureScopeImpl;", "Landroidx/compose/foundation/gestures/PressGestureScope;", "Landroidx/compose/ui/unit/Density;", "density", "(Landroidx/compose/ui/unit/Density;)V", "", "getDensity", "()F", "fontScale", "getFontScale", "isCanceled", "", "isReleased", "mutex", "Lkotlinx/coroutines/sync/Mutex;", "awaitRelease", "", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "cancel", "release", "reset", "tryAwaitRelease", "roundToPx", "", "Landroidx/compose/ui/unit/Dp;", "roundToPx-0680j_4", "(F)I", "Landroidx/compose/ui/unit/TextUnit;", "roundToPx--R2X_6o", "(J)I", "toDp", "toDp-GaN1DYA", "(J)F", "toDp-u2uoSUM", "(F)F", "(I)F", "toDpSize", "Landroidx/compose/ui/unit/DpSize;", "Landroidx/compose/ui/geometry/Size;", "toDpSize-k-rfVVM", "(J)J", "toPx", "toPx-0680j_4", "toPx--R2X_6o", "toRect", "Landroidx/compose/ui/geometry/Rect;", "Landroidx/compose/ui/unit/DpRect;", "toSize", "toSize-XkaWNTQ", "toSp", "toSp-0xMU5do", "(F)J", "toSp-kPz2Gy4", "(I)J", "foundation_release"}, k = 1, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public final class PressGestureScopeImpl implements PressGestureScope, Density { private final /* synthetic */ Density $$delegate_0; private boolean isCanceled; private boolean isReleased; private final Mutex mutex; @Override // androidx.compose.ui.unit.Density public float getDensity() { return this.$$delegate_0.getDensity(); } @Override // androidx.compose.ui.unit.Density public float getFontScale() { return this.$$delegate_0.getFontScale(); } @Override // androidx.compose.ui.unit.Density /* renamed from: roundToPx--R2X_6o, reason: not valid java name */ public int mo328roundToPxR2X_6o(long j) { return this.$$delegate_0.mo328roundToPxR2X_6o(j); } @Override // androidx.compose.ui.unit.Density /* renamed from: roundToPx-0680j_4, reason: not valid java name */ public int mo329roundToPx0680j_4(float f) { return this.$$delegate_0.mo329roundToPx0680j_4(f); } @Override // androidx.compose.ui.unit.Density /* renamed from: toDp-GaN1DYA, reason: not valid java name */ public float mo330toDpGaN1DYA(long j) { return this.$$delegate_0.mo330toDpGaN1DYA(j); } @Override // androidx.compose.ui.unit.Density /* renamed from: toDp-u2uoSUM, reason: not valid java name */ public float mo331toDpu2uoSUM(float f) { return this.$$delegate_0.mo331toDpu2uoSUM(f); } @Override // androidx.compose.ui.unit.Density /* renamed from: toDp-u2uoSUM, reason: not valid java name */ public float mo332toDpu2uoSUM(int i) { return this.$$delegate_0.mo332toDpu2uoSUM(i); } @Override // androidx.compose.ui.unit.Density /* renamed from: toDpSize-k-rfVVM, reason: not valid java name */ public long mo333toDpSizekrfVVM(long j) { return this.$$delegate_0.mo333toDpSizekrfVVM(j); } @Override // androidx.compose.ui.unit.Density /* renamed from: toPx--R2X_6o, reason: not valid java name */ public float mo334toPxR2X_6o(long j) { return this.$$delegate_0.mo334toPxR2X_6o(j); } @Override // androidx.compose.ui.unit.Density /* renamed from: toPx-0680j_4, reason: not valid java name */ public float mo335toPx0680j_4(float f) { return this.$$delegate_0.mo335toPx0680j_4(f); } @Override // androidx.compose.ui.unit.Density public Rect toRect(DpRect dpRect) { Intrinsics.checkNotNullParameter(dpRect, ""); return this.$$delegate_0.toRect(dpRect); } @Override // androidx.compose.ui.unit.Density /* renamed from: toSize-XkaWNTQ, reason: not valid java name */ public long mo336toSizeXkaWNTQ(long j) { return this.$$delegate_0.mo336toSizeXkaWNTQ(j); } @Override // androidx.compose.ui.unit.Density /* renamed from: toSp-0xMU5do, reason: not valid java name */ public long mo337toSp0xMU5do(float f) { return this.$$delegate_0.mo337toSp0xMU5do(f); } @Override // androidx.compose.ui.unit.Density /* renamed from: toSp-kPz2Gy4, reason: not valid java name */ public long mo338toSpkPz2Gy4(float f) { return this.$$delegate_0.mo338toSpkPz2Gy4(f); } @Override // androidx.compose.ui.unit.Density /* renamed from: toSp-kPz2Gy4, reason: not valid java name */ public long mo339toSpkPz2Gy4(int i) { return this.$$delegate_0.mo339toSpkPz2Gy4(i); } public PressGestureScopeImpl(Density density) { Intrinsics.checkNotNullParameter(density, "density"); this.$$delegate_0 = density; this.mutex = MutexKt.Mutex(false); } public final void cancel() { this.isCanceled = true; Mutex.DefaultImpls.unlock$default(this.mutex, null, 1, null); } public final void release() { this.isReleased = true; Mutex.DefaultImpls.unlock$default(this.mutex, null, 1, null); } /* JADX WARN: Removed duplicated region for block: B:15:0x0036 */ /* JADX WARN: Removed duplicated region for block: B:8:0x0024 */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public final java.lang.Object reset(kotlin.coroutines.Continuation r5) { /* r4 = this; boolean r0 = r5 instanceof androidx.compose.foundation.gestures.PressGestureScopeImpl$reset$1 if (r0 == 0) goto L14 r0 = r5 androidx.compose.foundation.gestures.PressGestureScopeImpl$reset$1 r0 = (androidx.compose.foundation.gestures.PressGestureScopeImpl$reset$1) r0 int r1 = r0.label r2 = -2147483648(0xffffffff80000000, float:-0.0) r1 = r1 & r2 if (r1 == 0) goto L14 int r5 = r0.label int r5 = r5 - r2 r0.label = r5 goto L19 L14: androidx.compose.foundation.gestures.PressGestureScopeImpl$reset$1 r0 = new androidx.compose.foundation.gestures.PressGestureScopeImpl$reset$1 r0.(r4, r5) L19: java.lang.Object r5 = r0.result java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED() int r2 = r0.label r3 = 1 if (r2 == 0) goto L36 if (r2 != r3) goto L2e java.lang.Object r4 = r0.L$0 androidx.compose.foundation.gestures.PressGestureScopeImpl r4 = (androidx.compose.foundation.gestures.PressGestureScopeImpl) r4 kotlin.ResultKt.throwOnFailure(r5) goto L47 L2e: java.lang.IllegalStateException r4 = new java.lang.IllegalStateException java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine" r4.(r5) throw r4 L36: kotlin.ResultKt.throwOnFailure(r5) kotlinx.coroutines.sync.Mutex r5 = r4.mutex r0.L$0 = r4 r0.label = r3 r2 = 0 java.lang.Object r5 = kotlinx.coroutines.sync.Mutex.DefaultImpls.lock$default(r5, r2, r0, r3, r2) if (r5 != r1) goto L47 return r1 L47: r5 = 0 r4.isReleased = r5 r4.isCanceled = r5 kotlin.Unit r4 = kotlin.Unit.INSTANCE return r4 */ throw new UnsupportedOperationException("Method not decompiled: androidx.compose.foundation.gestures.PressGestureScopeImpl.reset(kotlin.coroutines.Continuation):java.lang.Object"); } /* JADX WARN: Removed duplicated region for block: B:12:0x0046 */ /* JADX WARN: Removed duplicated region for block: B:15:0x0049 */ /* JADX WARN: Removed duplicated region for block: B:19:0x0032 */ /* JADX WARN: Removed duplicated region for block: B:8:0x0024 */ @Override // androidx.compose.foundation.gestures.PressGestureScope /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public java.lang.Object awaitRelease(kotlin.coroutines.Continuation r5) { /* r4 = this; boolean r0 = r5 instanceof androidx.compose.foundation.gestures.PressGestureScopeImpl$awaitRelease$1 if (r0 == 0) goto L14 r0 = r5 androidx.compose.foundation.gestures.PressGestureScopeImpl$awaitRelease$1 r0 = (androidx.compose.foundation.gestures.PressGestureScopeImpl$awaitRelease$1) r0 int r1 = r0.label r2 = -2147483648(0xffffffff80000000, float:-0.0) r1 = r1 & r2 if (r1 == 0) goto L14 int r5 = r0.label int r5 = r5 - r2 r0.label = r5 goto L19 L14: androidx.compose.foundation.gestures.PressGestureScopeImpl$awaitRelease$1 r0 = new androidx.compose.foundation.gestures.PressGestureScopeImpl$awaitRelease$1 r0.(r4, r5) L19: java.lang.Object r5 = r0.result java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED() int r2 = r0.label r3 = 1 if (r2 == 0) goto L32 if (r2 != r3) goto L2a kotlin.ResultKt.throwOnFailure(r5) goto L3e L2a: java.lang.IllegalStateException r4 = new java.lang.IllegalStateException java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine" r4.(r5) throw r4 L32: kotlin.ResultKt.throwOnFailure(r5) r0.label = r3 java.lang.Object r5 = r4.tryAwaitRelease(r0) if (r5 != r1) goto L3e return r1 L3e: java.lang.Boolean r5 = (java.lang.Boolean) r5 boolean r4 = r5.booleanValue() if (r4 == 0) goto L49 kotlin.Unit r4 = kotlin.Unit.INSTANCE return r4 L49: androidx.compose.foundation.gestures.GestureCancellationException r4 = new androidx.compose.foundation.gestures.GestureCancellationException java.lang.String r5 = "The press gesture was canceled." r4.(r5) throw r4 */ throw new UnsupportedOperationException("Method not decompiled: androidx.compose.foundation.gestures.PressGestureScopeImpl.awaitRelease(kotlin.coroutines.Continuation):java.lang.Object"); } /* JADX WARN: Removed duplicated region for block: B:16:0x0037 */ /* JADX WARN: Removed duplicated region for block: B:8:0x0025 */ @Override // androidx.compose.foundation.gestures.PressGestureScope /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public java.lang.Object tryAwaitRelease(kotlin.coroutines.Continuation r6) { /* r5 = this; boolean r0 = r6 instanceof androidx.compose.foundation.gestures.PressGestureScopeImpl$tryAwaitRelease$1 if (r0 == 0) goto L14 r0 = r6 androidx.compose.foundation.gestures.PressGestureScopeImpl$tryAwaitRelease$1 r0 = (androidx.compose.foundation.gestures.PressGestureScopeImpl$tryAwaitRelease$1) r0 int r1 = r0.label r2 = -2147483648(0xffffffff80000000, float:-0.0) r1 = r1 & r2 if (r1 == 0) goto L14 int r6 = r0.label int r6 = r6 - r2 r0.label = r6 goto L19 L14: androidx.compose.foundation.gestures.PressGestureScopeImpl$tryAwaitRelease$1 r0 = new androidx.compose.foundation.gestures.PressGestureScopeImpl$tryAwaitRelease$1 r0.(r5, r6) L19: java.lang.Object r6 = r0.result java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED() int r2 = r0.label r3 = 0 r4 = 1 if (r2 == 0) goto L37 if (r2 != r4) goto L2f java.lang.Object r5 = r0.L$0 androidx.compose.foundation.gestures.PressGestureScopeImpl r5 = (androidx.compose.foundation.gestures.PressGestureScopeImpl) r5 kotlin.ResultKt.throwOnFailure(r6) goto L4f L2f: java.lang.IllegalStateException r5 = new java.lang.IllegalStateException java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine" r5.(r6) throw r5 L37: kotlin.ResultKt.throwOnFailure(r6) boolean r6 = r5.isReleased if (r6 != 0) goto L54 boolean r6 = r5.isCanceled if (r6 != 0) goto L54 kotlinx.coroutines.sync.Mutex r6 = r5.mutex r0.L$0 = r5 r0.label = r4 java.lang.Object r6 = kotlinx.coroutines.sync.Mutex.DefaultImpls.lock$default(r6, r3, r0, r4, r3) if (r6 != r1) goto L4f return r1 L4f: kotlinx.coroutines.sync.Mutex r6 = r5.mutex kotlinx.coroutines.sync.Mutex.DefaultImpls.unlock$default(r6, r3, r4, r3) L54: boolean r5 = r5.isReleased java.lang.Boolean r5 = kotlin.coroutines.jvm.internal.Boxing.boxBoolean(r5) return r5 */ throw new UnsupportedOperationException("Method not decompiled: androidx.compose.foundation.gestures.PressGestureScopeImpl.tryAwaitRelease(kotlin.coroutines.Continuation):java.lang.Object"); } }