package com.revenuecat.purchases.ui.revenuecatui.components.carousel;

import A4.d;
import C4.e;
import C4.j;
import G.L;
import V4.C;
import com.revenuecat.purchases.paywalls.components.CarouselComponent;
import w4.C3137A;

/* JADX INFO: loaded from: classes3.dex */
@e(c = "com.revenuecat.purchases.ui.revenuecatui.components.carousel.CarouselComponentViewKt$EnableAutoAdvance$1$1", f = "CarouselComponentView.kt", l = {293, 301}, m = "invokeSuspend")
public final class CarouselComponentViewKt$EnableAutoAdvance$1$1 extends j implements J4.e {
    final /* synthetic */ CarouselComponent.AutoAdvancePages $autoAdvance;
    final /* synthetic */ int $pageCount;
    final /* synthetic */ L $pagerState;
    final /* synthetic */ boolean $shouldLoop;
    int label;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public CarouselComponentViewKt$EnableAutoAdvance$1$1(CarouselComponent.AutoAdvancePages autoAdvancePages, L l, boolean z6, int i6, d dVar) {
        super(2, dVar);
        this.$autoAdvance = autoAdvancePages;
        this.$pagerState = l;
        this.$shouldLoop = z6;
        this.$pageCount = i6;
    }

    @Override // C4.a
    public final d create(Object obj, d dVar) {
        return new CarouselComponentViewKt$EnableAutoAdvance$1$1(this.$autoAdvance, this.$pagerState, this.$shouldLoop, this.$pageCount, dVar);
    }

    @Override // J4.e
    public final Object invoke(C c6, d dVar) {
        return ((CarouselComponentViewKt$EnableAutoAdvance$1$1) create(c6, dVar)).invokeSuspend(C3137A.f25453a);
    }

    /* JADX WARN: Path cross not found for [B:12:0x001f, B:17:0x0039], limit reached: 26 */
    /* JADX WARN: Path cross not found for [B:17:0x0039, B:12:0x001f], limit reached: 26 */
    /* JADX WARN: Removed duplicated region for block: B:15:0x002f  */
    /* JADX WARN: Removed duplicated region for block: B:17:0x0039  */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:16:0x0037 -> B:12:0x001f). Please report as a decompilation issue!!! */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:22:0x0064 -> B:12:0x001f). Please report as a decompilation issue!!! */
    /*  JADX ERROR: JadxRuntimeException in pass: RegionMakerVisitor
        jadx.core.utils.exceptions.JadxRuntimeException: Can't find top splitter block for handler:B:24:0x001f
        	at jadx.core.utils.BlockUtils.getTopSplitterForHandler(BlockUtils.java:1182)
        	at jadx.core.dex.visitors.regions.maker.ExcHandlersRegionMaker.collectHandlerRegions(ExcHandlersRegionMaker.java:53)
        	at jadx.core.dex.visitors.regions.maker.ExcHandlersRegionMaker.process(ExcHandlersRegionMaker.java:38)
        	at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:27)
        */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final java.lang.Object invokeSuspend(java.lang.Object r9) {
        /*
            r8 = this;
            B4.a r0 = B4.a.f492a
            int r1 = r8.label
            r2 = 2
            r3 = 1
            if (r1 == 0) goto L1c
            if (r1 == r3) goto L18
            if (r1 != r2) goto L10
            m3.AbstractC2467b.l(r9)     // Catch: java.util.concurrent.CancellationException -> L1f
            goto L1f
        L10:
            java.lang.IllegalStateException r9 = new java.lang.IllegalStateException
            java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
            r9.<init>(r0)
            throw r9
        L18:
            m3.AbstractC2467b.l(r9)
            goto L2f
        L1c:
            m3.AbstractC2467b.l(r9)
        L1f:
            com.revenuecat.purchases.paywalls.components.CarouselComponent$AutoAdvancePages r9 = r8.$autoAdvance
            int r9 = r9.getMsTimePerPage()
            long r4 = (long) r9
            r8.label = r3
            java.lang.Object r9 = V4.E.l(r4, r8)
            if (r9 != r0) goto L2f
            goto L66
        L2f:
            G.L r9 = r8.$pagerState
            x.q r9 = r9.f1698k
            boolean r9 = r9.a()
            if (r9 != 0) goto L1f
            boolean r9 = r8.$shouldLoop
            if (r9 == 0) goto L45
            G.L r9 = r8.$pagerState
            int r9 = r9.l()
            int r9 = r9 + r3
            goto L4f
        L45:
            G.L r9 = r8.$pagerState
            int r9 = r9.l()
            int r9 = r9 + r3
            int r1 = r8.$pageCount
            int r9 = r9 % r1
        L4f:
            G.L r1 = r8.$pagerState     // Catch: java.util.concurrent.CancellationException -> L1f
            com.revenuecat.purchases.paywalls.components.CarouselComponent$AutoAdvancePages r4 = r8.$autoAdvance     // Catch: java.util.concurrent.CancellationException -> L1f
            int r4 = r4.getMsTransitionTime()     // Catch: java.util.concurrent.CancellationException -> L1f
            r5 = 6
            r6 = 0
            r7 = 0
            q.F0 r4 = q.AbstractC2771e.p(r4, r7, r6, r5)     // Catch: java.util.concurrent.CancellationException -> L1f
            r8.label = r2     // Catch: java.util.concurrent.CancellationException -> L1f
            java.lang.Object r9 = G.L.g(r1, r9, r4, r8, r2)     // Catch: java.util.concurrent.CancellationException -> L1f
            if (r9 != r0) goto L1f
        L66:
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: com.revenuecat.purchases.ui.revenuecatui.components.carousel.CarouselComponentViewKt$EnableAutoAdvance$1$1.invokeSuspend(java.lang.Object):java.lang.Object");
    }
}
